print an error and don't crash when we get a non-RFC-complient jid

This commit is contained in:
Yann Leboulanger 2005-11-24 21:05:18 +00:00
parent 8c3d0c8014
commit a6643b103b
1 changed files with 6 additions and 1 deletions

View File

@ -1271,7 +1271,12 @@ class Connection:
roster = {} roster = {}
for jid in r: for jid in r:
roster[helpers.parse_jid(jid)] = r[jid] try:
j = helpers.parse_jid(jid)
except:
print >> sys.sterr, _('Jid %s is not RFC complient. It will not be added to your roster. Use roster management tools such as http://jru.jabberstudio.org/ to remove it')
else:
roster[j] = r[jid]
# Remove or jid # Remove or jid
our_jid = helpers.parse_jid(gajim.get_jid_from_account(self.name)) our_jid = helpers.parse_jid(gajim.get_jid_from_account(self.name))