The branch, master has been updated via 8954b44937f0ebc928b8d21b27a8e75d775ff9f5 (commit) from e662d998266104114321ad009661d83f9339c81c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8954b44937f0ebc928b8d21b27a8e75d775ff9f5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Sep 3 18:22:51 2013 +0200 Make notifications more robust. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 4 ++-- pyhoca/wxgui/notify.py | 36 ++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 18 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 42a586e..1a96f31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ pyhoca-gui (0.4.0.9-0~x2go1) UNRELEASED; urgency=low - * New upstream release (0.4.0.9):+ - - Continue development... + * New upstream release (0.4.0.9): + - Make notifications more robust. * /debian/copyright: + Update file. Add entry for file icon2exe.py. diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index 2b27c6b..b1362f9 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -126,9 +126,11 @@ class libnotify_NotifierPopup(object): except KeyError: pass - icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon) + if icon: + icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon) - self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE) + if title and text: + self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE) if not self._PyHocaGUI.disable_notifications: n = pynotify.Notification(title, text, icon) @@ -279,14 +281,15 @@ class showballoon_NotifierPopup(object): except: pass - # on Windows some error messages are already encoded, some are not, depending from which module they come - try: _title = title.encode(utils.get_encoding()) - except: _title = title - try: _text = text.encode(utils.get_encoding()) - except: _text = text + if title and text: + # on Windows some error messages are already encoded, some are not, depending from which module they come + try: _title = title.encode(utils.get_encoding()) + except: _title = title + try: _text = text.encode(utils.get_encoding()) + except: _text = text - try: self._pyhoca_logger('['+_title+'] '+_text, loglevel=log.loglevel_NOTICE) - except UnicodeDecodeError: self._pyhoca_logger('Unicode error occurred while rendering a log message...', loglevel=log.loglevel_WARN) + try: self._pyhoca_logger('['+_title+'] '+_text, loglevel=log.loglevel_NOTICE) + except UnicodeDecodeError: self._pyhoca_logger('Unicode error occurred while rendering a log message...', loglevel=log.loglevel_WARN) def Close(self): """\ @@ -434,14 +437,15 @@ class notificationmessage_NotifierPopup(object): # wx.NotificationMessage class pass - # on Windows some error messages are already encoded, some are not, depending from which module they come - try: _title = title.encode(utils.get_encoding()) - except: _title = title - try: _text = text.encode(utils.get_encoding()) - except: _text = text + if title and text: + # on Windows some error messages are already encoded, some are not, depending from which module they come + try: _title = title.encode(utils.get_encoding()) + except: _title = title + try: _text = text.encode(utils.get_encoding()) + except: _text = text - try: self._pyhoca_logger('['+_title+'] '+_text, loglevel=log.loglevel_NOTICE) - except UnicodeDecodeError: self._pyhoca_logger('Unicode error occurred while rendering a log message...', loglevel=log.loglevel_WARN) + try: self._pyhoca_logger('['+_title+'] '+_text, loglevel=log.loglevel_NOTICE) + except UnicodeDecodeError: self._pyhoca_logger('Unicode error occurred while rendering a log message...', loglevel=log.loglevel_WARN) def Close(self): """\ hooks/post-receive -- pyhoca-gui.git (Python X2Go Client (wxPython GUI)) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).