[X2Go-Commits] [pyhoca-gui] 01/01: pyhoca/wxgui/notify.py: No byte objects in log strings.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 27 14:56:06 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pyhoca-gui.
commit 6768cc20003d475d6ed6668cbbfe719ded55340f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Dec 27 13:55:58 2019 +0000
pyhoca/wxgui/notify.py: No byte objects in log strings.
---
debian/changelog | 1 +
pyhoca/wxgui/notify.py | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 55a9ebc..abd77b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ pyhoca-gui (0.6.1.1-0x2go1) UNRELEASED; urgency=medium
- pyhoca/wxgui/logon.py: Use wx.Cursor with wxgtk4.0.
- pyhoca/wxgui/menus_taskbar.py: Fix AppendMenu wrapper. (All self.AppendMenu
implementations lacked a return statement).
+ - pyhoca/wxgui/notify.py: No byte objects in log strings.
-- X2Go Release Manager <git-admin at x2go.org> Fri, 27 Dec 2019 07:42:21 +0100
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index 40e9783..5b767e9 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -19,6 +19,7 @@
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+import sys
import wx
from x2go import X2GOCLIENT_OS
from x2go import log
@@ -132,7 +133,10 @@ class stdout_NotifierPopup(object):
pass
if title and text:
- self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE)
+ if sys.version_info[0] >= 3:
+ self._pyhoca_logger('[%s] %s' % (title, text), loglevel=log.loglevel_NOTICE)
+ else:
+ self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE)
def Close(self):
"""\
@@ -245,7 +249,9 @@ class libnotify_NotifierPopup(object):
if icon:
icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon)
- if title and text:
+ if sys.version_info[0] >= 3:
+ self._pyhoca_logger('[%s] %s' % (title, text), loglevel=log.loglevel_NOTICE)
+ else:
self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE)
try:
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
More information about the x2go-commits
mailing list