changeset 89ca4c2f1dd0 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=89ca4c2f1dd0
description: plugin system. checking the type of stored data. Fix #7220
diffstat:
src/plugins/plugin.py | 2 ++
src/roster_window.py | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 2359e1b05621 -r 89ca4c2f1dd0 src/plugins/plugin.py
--- a/src/plugins/plugin.py Mon Aug 20 15:46:20 2012 +0200
+++ b/src/plugins/plugin.py Wed Aug 22 22:21:26 2012 +0400
@@ -259,6 +259,8 @@
s = shelve.open(self.FILE_PATH)
for (k, v) in s.iteritems():
self.data[k] = v
+ if not isinstance(self.data, dict):
+ raise GajimPluginException
s.close()
self.save()
except:
diff -r 2359e1b05621 -r 89ca4c2f1dd0 src/roster_window.py
--- a/src/roster_window.py Mon Aug 20 15:46:20 2012 +0200
+++ b/src/roster_window.py Wed Aug 22 22:21:26 2012 +0400
@@ -1192,10 +1192,10 @@
# add status msg, if not empty, under contact name in
# the treeview
+ if not contact.status:
+ contact.status = ' '
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
- status = contact.status.strip()
- if status != '':
- status = helpers.reduce_chars_newlines(status,
+ status = helpers.reduce_chars_newlines(contact.status,
max_lines = 1)
# escape markup entities and make them small
# italic and fg color color is calcuted to be
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits