Permalink
Browse files

fix 2 bugs using gtalk (handle empty values for some varibles)

  • Loading branch information...
1 parent 13aace4 commit ff41568c8b81ca9c4c3d4d5ee801487371dcf36a @marianoguerra committed Sep 7, 2011
Showing with 12 additions and 1 deletion.
  1. +9 −1 emesene/e3/jabber/Worker.py
  2. +3 −0 emesene/gui/common/PyNotification.py
@@ -208,7 +208,15 @@ def _on_photo_update(self, session, stanza):
return session.SendAndCallForResponse(iq, self._on_contact_jabber_changed)
def _on_contact_jabber_changed(self, session, stanza):
- photo = stanza.getTag('vCard').getTag('PHOTO')
+ if stanza is None:
+ return
+
+ vcard = stanza.getTag('vCard')
+
+ if vcard is None:
+ return
+
+ photo = vcard.getTag('PHOTO')
account = stanza.getFrom().getStripped()
if not photo:
@@ -33,6 +33,9 @@ def PyNotification(title, text, picture_path=None, const=None,
callback=None, tooltip=None):
if const == 'message-im':
#In this case title is contact nick
+ if title is None:
+ title = ""
+
title = Plus.msnplus_strip(title)
notification = pynotify.Notification(title, text, picture_path)
notification.set_hint_string("append", "allowed")

0 comments on commit ff41568

Please sign in to comment.