changeset a75bdf1f17ab in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a75bdf1f17ab
description: remove old FIXME, don't crash when we receive badly encoded char via zeroconf. Fixes #5178
diffstat:
src/common/zeroconf/zeroconf_avahi.py | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (25 lines):
diff -r 83c045efe553 -r a75bdf1f17ab src/common/zeroconf/zeroconf_avahi.py
--- a/src/common/zeroconf/zeroconf_avahi.py Tue Jul 28 23:13:34 2009 +0200
+++ b/src/common/zeroconf/zeroconf_avahi.py Wed Jul 29 12:09:02 2009 +0200
@@ -115,11 +115,7 @@
for els in txt_array:
key, val = '', None
for c in els:
- #FIXME: remove when outdated, this is for avahi < 0.6.14
- if c < 0 or c > 255:
- c = '.'
- else:
- c = chr(c)
+ c = chr(c)
if val is None:
if c == '=':
val = ''
@@ -129,7 +125,7 @@
val += c
if val is None: # missing '='
val = ''
- txt_dict[key] = val.decode('utf-8')
+ txt_dict[key] = val.decode('utf-8', 'ignore')
return txt_dict
def service_resolved_callback(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
changeset 342d1199fe15 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=342d1199fe15
description: prevent traceback
diffstat:
src/roster_window.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (25 lines):
diff -r 1a07908cf4b4 -r 342d1199fe15 src/roster_window.py
--- a/src/roster_window.py Wed Jul 22 00:13:28 2009 +0200
+++ b/src/roster_window.py Fri Jul 24 16:17:49 2009 +0200
@@ -747,13 +747,14 @@
# Remove contact before redrawing, otherwise the old
# numbers will still be show
gajim.contacts.remove_jid(account, jid, remove_meta=True)
- rest_of_family = [data for data in family
- if account != data['account'] or jid != data['jid']]
- if iters and rest_of_family:
- # reshow the rest of the family
- brothers = self._add_metacontact_family(rest_of_family, account)
- for c, acc in brothers:
- self.draw_completely(c.jid, acc)
+ if iters:
+ rest_of_family = [data for data in family
+ if account != data['account'] or jid != data['jid']]
+ if rest_of_family:
+ # reshow the rest of the family
+ brothers = self._add_metacontact_family(rest_of_family, account)
+ for c, acc in brothers:
+ self.draw_completely(c.jid, acc)
if iters:
# Draw all groups of the contact