diff options
author | ramon <ramongomez@us.es> | 2017-10-24 12:58:32 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-10-24 12:58:32 +0000 |
commit | 82bc070416549d4f49f4878f9df22ac29b86cf3d (patch) | |
tree | a5ccfa7882c29583837affdce00c8675d0beef85 /admin/Sources/Clients/ogagent/src/OGAgentUser.py | |
parent | 683eccc82886a2fac0711f735fd45433d19cdc7d (diff) |
#718: Permitir caracteres Unicode y mensajes de varias lĂneas en OGAgent para Windows.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5481 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Sources/Clients/ogagent/src/OGAgentUser.py')
-rw-r--r-- | admin/Sources/Clients/ogagent/src/OGAgentUser.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/admin/Sources/Clients/ogagent/src/OGAgentUser.py b/admin/Sources/Clients/ogagent/src/OGAgentUser.py index 4ec09cee..0a7c9ee2 100644 --- a/admin/Sources/Clients/ogagent/src/OGAgentUser.py +++ b/admin/Sources/Clients/ogagent/src/OGAgentUser.py @@ -32,14 +32,13 @@ from __future__ import unicode_literals import sys -from PyQt4 import QtGui -from PyQt4 import QtCore - import time import signal import json import six import atexit +from PyQt4 import QtGui +from PyQt4 import QtCore from opengnsys import ipc from opengnsys import utils @@ -53,6 +52,11 @@ from opengnsys import VERSION from opengnsys.config import readConfig from opengnsys.loader import loadModules +# Set default characters encoding to UTF-8 +reload(sys) +if hasattr(sys, 'setdefaultencoding'): + sys.setdefaultencoding('utf-8') + trayIcon = None def sigAtExit(): @@ -309,7 +313,7 @@ class OGASystemTray(QtGui.QSystemTrayIcon): self.cleanup() self.app.quit() - def closeEvent(self,event): + def closeEvent(self, event): logger.debug("Exec closeEvent") event.accept() self.quit() |