gajim: prevent traceback in trigger plugin.
changeset f8214ad33106 in /home/hg/repos/gajim details:http://hg.gajim.org/gajim?cmd=changeset;node=f8214ad33106 description: prevent traceback in trigger plugin. diffstat: plugins/triggers/manifest.ini | 2 +- plugins/triggers/triggers.py | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diffs (28 lines): diff -r 4d993fc1b8d8 -r f8214ad33106 plugins/triggers/manifest.ini --- a/plugins/triggers/manifest.ini Tue Nov 08 20:01:51 2011 +0100 +++ b/plugins/triggers/manifest.ini Tue Nov 08 20:23:48 2011 +0100 @@ -1,7 +1,7 @@ [info] name: Triggers short_name: triggers -version: 0.0.2 +version: 0.0.3 description: Configure Gajim's behaviour for each contact authors: Yann Leboulanger aste...@lagaule.org homepage: http://trac.gajim.org/wiki/ diff -r 4d993fc1b8d8 -r f8214ad33106 plugins/triggers/triggers.py --- a/plugins/triggers/triggers.py Tue Nov 08 20:01:51 2011 +0100 +++ b/plugins/triggers/triggers.py Tue Nov 08 20:23:48 2011 +0100 @@ -48,8 +48,10 @@ if rule['recipient_type'] == 'contact' and obj.jid not in \ rule_recipients: return False -contact_groups = gajim.contacts.get_first_contact_from_jid( -obj.conn.name, obj.jid).groups +contact = gajim.contacts.get_first_contact_from_jid(obj.conn.name, obj.jid) +if not contact: # PM? +return False +contact_groups = contact.groups group_found = False for group in contact_groups: if group in rule_recipients: ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits
gajim: prevent traceback in trigger plugin.
changeset 0ec525152985 in /home/hg/repos/gajim details:http://hg.gajim.org/gajim?cmd=changeset;node=0ec525152985 description: prevent traceback in trigger plugin. diffstat: plugins/triggers/manifest.ini | 2 +- plugins/triggers/triggers.py | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diffs (28 lines): diff -r e873dbfdbcc5 -r 0ec525152985 plugins/triggers/manifest.ini --- a/plugins/triggers/manifest.ini Tue Nov 08 20:01:51 2011 +0100 +++ b/plugins/triggers/manifest.ini Tue Nov 08 20:23:48 2011 +0100 @@ -1,7 +1,7 @@ [info] name: Triggers short_name: triggers -version: 0.0.2 +version: 0.0.3 description: Configure Gajim's behaviour for each contact authors: Yann Leboulanger aste...@lagaule.org homepage: http://trac.gajim.org/wiki/ diff -r e873dbfdbcc5 -r 0ec525152985 plugins/triggers/triggers.py --- a/plugins/triggers/triggers.py Tue Nov 08 20:01:51 2011 +0100 +++ b/plugins/triggers/triggers.py Tue Nov 08 20:23:48 2011 +0100 @@ -48,8 +48,10 @@ if rule['recipient_type'] == 'contact' and obj.jid not in \ rule_recipients: return False -contact_groups = gajim.contacts.get_first_contact_from_jid( -obj.conn.name, obj.jid).groups +contact = gajim.contacts.get_first_contact_from_jid(obj.conn.name, obj.jid) +if not contact: # PM? +return False +contact_groups = contact.groups group_found = False for group in contact_groups: if group in rule_recipients: ___ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits