From bb5db97546fff363516c4704fbff2ed79d6df06f Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 22 Aug 2012 22:21:26 +0400 Subject: [PATCH] plugin system. checking the type of stored data. Fix #7220 --- src/plugins/plugin.py | 2 ++ src/roster_window.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/plugin.py b/src/plugins/plugin.py index 781be53d0..b668c2765 100644 --- a/src/plugins/plugin.py +++ b/src/plugins/plugin.py @@ -259,6 +259,8 @@ class GajimPluginConfig(): 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 --git a/src/roster_window.py b/src/roster_window.py index 7bf6d58ae..78c879a7f 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1192,10 +1192,10 @@ class RosterWindow: # 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