#940: Run `2to3` on OGAgent source code

Result after running the command: `2to3 -w ogagent/src`
remotes/github/python3
Ramón M. Gómez 2020-05-04 19:51:32 +02:00
parent 1528428d8b
commit 53e7d458c5
34 changed files with 81 additions and 91 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2014 Virtual Cable S.L. # Copyright (c) 2014 Virtual Cable S.L.
@ -29,28 +29,21 @@
""" """
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
""" """
from __future__ import unicode_literals import atexit
import base64
import json import json
import sys import sys
import time import time
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
import six
import atexit
from opengnsys import VERSION, ipc, operations, utils
from opengnsys.log import logger
from opengnsys.service import IPC_PORT
from about_dialog_ui import Ui_OGAAboutDialog from about_dialog_ui import Ui_OGAAboutDialog
from message_dialog_ui import Ui_OGAMessageDialog from message_dialog_ui import Ui_OGAMessageDialog
from opengnsys.scriptThread import ScriptExecutorThread from opengnsys import VERSION, ipc, operations, utils
from opengnsys.config import readConfig from opengnsys.config import readConfig
from opengnsys.loader import loadModules from opengnsys.loader import loadModules
from opengnsys.log import logger
# Set default characters encoding to UTF-8 from opengnsys.scriptThread import ScriptExecutorThread
reload(sys) from opengnsys.service import IPC_PORT
if hasattr(sys, 'setdefaultencoding'):
sys.setdefaultencoding('utf-8')
trayIcon = None trayIcon = None
@ -61,7 +54,7 @@ def sigAtExit():
# About dialog # About dialog
class OGAAboutDialog(QtGui.QDialog): class OGAAboutDialog(QtWidgets.QDialog):
def __init__(self, parent=None): def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent) QtWidgets.QDialog.__init__(self, parent)
self.ui = Ui_OGAAboutDialog() self.ui = Ui_OGAAboutDialog()
@ -115,13 +108,13 @@ class MessagesProcessor(QtCore.QThread):
def isAlive(self): def isAlive(self):
return self.ipc is not None return self.ipc is not None
def sendLogin(self, userName, language): def sendLogin(self, username, language):
if self.ipc: if self.ipc:
self.ipc.sendLogin(userName, language) self.ipc.sendLogin(username, language)
def sendLogout(self, userName): def sendLogout(self, username):
if self.ipc: if self.ipc:
self.ipc.sendLogout(userName) self.ipc.sendLogout(username)
def run(self): def run(self):
if self.ipc is None: if self.ipc is None:
@ -136,15 +129,15 @@ class MessagesProcessor(QtCore.QThread):
msg = self.ipc.getMessage() msg = self.ipc.getMessage()
if msg is None: if msg is None:
break break
msgId, data = msg msg_id, data = msg
logger.debug('Got Message on User Space: {}:{}'.format(msgId, data)) logger.debug('Got Message on User Space: {}:{}'.format(msgId, data))
if msgId == ipc.MSG_MESSAGE: if msg_id == ipc.MSG_MESSAGE:
module, message, data = data.split('\0') module, message, data = data.split('\0')
self.message.emit((module, message, data)) self.message.emit((module, message, data))
elif msgId == ipc.MSG_LOGOFF: elif msg_id == ipc.MSG_LOGOFF:
self.logoff.emit() self.logoff.emit()
elif msgId == ipc.MSG_SCRIPT: elif msg_id == ipc.MSG_SCRIPT:
self.script.emit(QtCore.QString.fromUtf8(data)) self.script.emit(data.decode('utf-8'))
except Exception as e: except Exception as e:
try: try:
logger.error('Got error on IPC thread {}'.format(utils.exceptionToMessage(e))) logger.error('Got error on IPC thread {}'.format(utils.exceptionToMessage(e)))
@ -161,17 +154,14 @@ class OGASystemTray(QtWidgets.QSystemTrayIcon):
def __init__(self, app_, parent=None): def __init__(self, app_, parent=None):
self.app = app_ self.app = app_
self.config = readConfig(client=True) self.config = readConfig(client=True)
self.modules = None
# Get opengnsys section as dict # Get opengnsys section as dict
cfg = dict(self.config.items('opengnsys')) cfg = dict(self.config.items('opengnsys'))
# Set up log level # Set up log level
logger.setLevel(cfg.get('log', 'INFO')) logger.setLevel(cfg.get('log', 'INFO'))
self.ipcport = int(cfg.get('ipc_port', IPC_PORT)) self.ipcport = int(cfg.get('ipc_port', IPC_PORT))
# style = app.style()
# icon = QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_ComputerIcon))
icon = QtGui.QIcon(':/images/img/oga.png') icon = QtGui.QIcon(':/images/img/oga.png')
QtWidgets.QSystemTrayIcon.__init__(self, icon, parent) QtWidgets.QSystemTrayIcon.__init__(self, icon, parent)
@ -208,18 +198,16 @@ class OGASystemTray(QtWidgets.QSystemTrayIcon):
logger.debug('Modules: {}'.format(list(v.name for v in self.modules))) logger.debug('Modules: {}'.format(list(v.name for v in self.modules)))
# Send init to all modules # Send init to all modules
validMods = [] valid_mods = []
for mod in self.modules: for mod in self.modules:
try: try:
logger.debug('Activating module {}'.format(mod.name)) logger.debug('Activating module {}'.format(mod.name))
mod.activate() mod.activate()
validMods.append(mod) valid_mods.append(mod)
except Exception as e: except Exception as e:
logger.exception() logger.exception()
logger.error("Activation of {} failed: {}".format(mod.name, utils.exceptionToMessage(e))) logger.error("Activation of {} failed: {}".format(mod.name, utils.exceptionToMessage(e)))
self.modules[:] = valid_mods # copy instead of assignment
self.modules[:] = validMods # copy instead of assignment
# If this is running, it's because he have logged in, inform service of this fact # If this is running, it's because he have logged in, inform service of this fact
self.ipc.sendLogin(operations.getCurrentUser(), operations.getSessionLanguage()) self.ipc.sendLogin(operations.getCurrentUser(), operations.getSessionLanguage())
@ -259,7 +247,7 @@ class OGASystemTray(QtWidgets.QSystemTrayIcon):
def executeScript(self, script): def executeScript(self, script):
logger.debug('Executing script') logger.debug('Executing script')
script = six.text_type(script.toUtf8()).decode('base64') script = base64.b64decode(script.encode('ascii'))
th = ScriptExecutorThread(script) th = ScriptExecutorThread(script)
th.start() th.start()

View File

@ -6,7 +6,7 @@
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore from PyQt5 import QtCore
qt_resource_data = b"\ qt_resource_data = b"\
\x00\x00\x0f\x42\ \x00\x00\x0f\x42\

View File

@ -32,7 +32,7 @@
# pylint: disable-msg=E1101,W0703 # pylint: disable-msg=E1101,W0703
from __future__ import unicode_literals
import requests import requests
import logging import logging

View File

@ -29,13 +29,13 @@
""" """
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
""" """
from __future__ import unicode_literals
# On centos, old six release does not includes byte2int, nor six.PY2 # On centos, old six release does not includes byte2int, nor six.PY2
import six import six
import modules from . import modules
from RESTApi import REST, RESTError from .RESTApi import REST, RESTError
try: try:
with open('../VERSION', 'r') as v: with open('../VERSION', 'r') as v:

View File

@ -26,24 +26,25 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
''' """
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' """
# pylint: disable=unused-wildcard-import, wildcard-import # pylint: disable=unused-wildcard-import, wildcard-import
from __future__ import unicode_literals
from ConfigParser import SafeConfigParser
from configparser import SafeConfigParser
config = None config = None
def readConfig(client=False): def readConfig(client=False):
''' """
Reads configuration file Reads configuration file
If client is False, will read ogagent.cfg as configuration If client is False, will read ogagent.cfg as configuration
If client is True, will read ogclient.cfg as configuration If client is True, will read ogclient.cfg as configuration
This is this way so we can protect ogagent.cfg against reading for non admin users on all platforms. This is this way so we can protect ogagent.cfg against reading for non admin users on all platforms.
''' """
cfg = SafeConfigParser() cfg = SafeConfigParser()
if client is True: if client is True:
fname = 'ogclient.cfg' fname = 'ogclient.cfg'
@ -55,4 +56,3 @@ def readConfig(client=False):
return None return None
return cfg return cfg

View File

@ -29,7 +29,7 @@
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
# pylint: disable=unused-wildcard-import,wildcard-import # pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals, print_function
# Pydev can't parse "six.moves.xxxx" because it is loaded lazy # Pydev can't parse "six.moves.xxxx" because it is loaded lazy
import six import six

View File

@ -28,7 +28,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import socket import socket
import threading import threading

View File

@ -26,10 +26,10 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
''' """
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' """
from __future__ import unicode_literals
from opengnsys.service import CommonService from opengnsys.service import CommonService
from opengnsys.service import IPC_PORT from opengnsys.service import IPC_PORT
@ -45,7 +45,7 @@ import json
try: try:
from prctl import set_proctitle # @UnresolvedImport from prctl import set_proctitle # @UnresolvedImport
except Exception: # Platform may not include prctl, so in case it's not available, we let the "name" as is except ImportError: # Platform may not include prctl, so in case it's not available, we let the "name" as is
def set_proctitle(_): def set_proctitle(_):
pass pass
@ -64,7 +64,6 @@ class OGAgentSvc(Daemon, CommonService):
# Call modules initialization # Call modules initialization
# They are called in sequence, no threading is done at this point, so ensure modules onActivate always returns # They are called in sequence, no threading is done at this point, so ensure modules onActivate always returns
# ********************* # *********************
# * Main Service loop * # * Main Service loop *
# ********************* # *********************
@ -93,6 +92,7 @@ def usage():
sys.stderr.write("usage: {} start|stop|restart|fg|login 'username'|logout 'username'|message 'module' 'message' 'json'\n".format(sys.argv[0])) sys.stderr.write("usage: {} start|stop|restart|fg|login 'username'|logout 'username'|message 'module' 'message' 'json'\n".format(sys.argv[0]))
sys.exit(2) sys.exit(2)
if __name__ == '__main__': if __name__ == '__main__':
logger.setLevel('INFO') logger.setLevel('INFO')
@ -106,7 +106,6 @@ if __name__ == '__main__':
except Exception as e: except Exception as e:
logger.error(e) logger.error(e)
if len(sys.argv) == 3 and sys.argv[1] in ('login', 'logout'): if len(sys.argv) == 3 and sys.argv[1] in ('login', 'logout'):
logger.debug('Running client opengnsys') logger.debug('Running client opengnsys')
client = None client = None

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import socket import socket
import platform import platform

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import platform import platform
import os import os

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
from opengnsys.linux.renamer import renamers from opengnsys.linux.renamer import renamers
from opengnsys.log import logger from opengnsys.log import logger

View File

@ -28,7 +28,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
from opengnsys.linux.renamer import renamers from opengnsys.linux.renamer import renamers
from opengnsys.log import logger from opengnsys.log import logger

View File

@ -28,7 +28,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
from opengnsys.linux.renamer import renamers from opengnsys.linux.renamer import renamers
from opengnsys.log import logger from opengnsys.log import logger

View File

@ -33,7 +33,7 @@
# This is a simple module loader, so we can add "external opengnsys" modules as addons # This is a simple module loader, so we can add "external opengnsys" modules as addons
# Modules under "opengsnsys/modules" are always autoloaded # Modules under "opengsnsys/modules" are always autoloaded
from __future__ import unicode_literals
import pkgutil import pkgutil
import os.path import os.path

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import traceback import traceback
import sys import sys

View File

@ -29,4 +29,4 @@
''' '''
@author: Ramón M. Gómez, ramongomez at us dot es @author: Ramón M. Gómez, ramongomez at us dot es
''' '''
from __future__ import unicode_literals

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import socket import socket
import platform import platform

View File

@ -28,7 +28,7 @@
""" """
@author: Ramón M. Gómez, ramongomez at us dot es @author: Ramón M. Gómez, ramongomez at us dot es
""" """
from __future__ import unicode_literals
from opengnsys.workers import ClientWorker from opengnsys.workers import ClientWorker

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2014 Virtual Cable S.L. # Copyright (c) 2014 Virtual Cable S.L.
@ -28,7 +29,7 @@
""" """
@author: Ramón M. Gómez, ramongomez at us dot es @author: Ramón M. Gómez, ramongomez at us dot es
""" """
from __future__ import unicode_literals
import os import os
import random import random
@ -36,12 +37,14 @@ import shutil
import string import string
import threading import threading
import time import time
import urllib import urllib.error
import urllib.parse
import urllib.request
from opengnsys.workers import ServerWorker from opengnsys import REST, operations, VERSION
from opengnsys import REST, RESTError, operations, VERSION
from opengnsys.log import logger from opengnsys.log import logger
from opengnsys.scriptThread import ScriptExecutorThread from opengnsys.scriptThread import ScriptExecutorThread
from opengnsys.workers import ServerWorker
# Check authorization header decorator # Check authorization header decorator
@ -312,7 +315,7 @@ class OpenGnSysWorker(ServerWorker):
""" """
logger.debug('Processing script request') logger.debug('Processing script request')
# Decoding script (Windows scripts need a subprocess call per line) # Decoding script (Windows scripts need a subprocess call per line)
script = urllib.unquote(post_params.get('script').decode('base64')).decode('utf8') script = urllib.parse.unquote(post_params.get('script').decode('base64')).decode('utf8')
if operations.os_type == 'Windows': if operations.os_type == 'Windows':
script = 'import subprocess; {0}'.format( script = 'import subprocess; {0}'.format(
';'.join(['subprocess.check_output({0},shell=True)'.format(repr(c)) for c in script.split('\n')])) ';'.join(['subprocess.check_output({0},shell=True)'.format(repr(c)) for c in script.split('\n')]))

View File

@ -31,7 +31,7 @@
""" """
# pylint: disable=unused-wildcard-import,wildcard-import # pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals
import sys import sys
# Importing platform operations and getting operating system data. # Importing platform operations and getting operating system data.

View File

@ -26,10 +26,10 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
''' """
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' """
from __future__ import unicode_literals
from .log import logger from .log import logger
from .config import readConfig from .config import readConfig

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import sys import sys
import six import six

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
# pylint: disable=unused-wildcard-import, wildcard-import # pylint: disable=unused-wildcard-import, wildcard-import
import win32serviceutil # @UnresolvedImport, pylint: disable=import-error import win32serviceutil # @UnresolvedImport, pylint: disable=import-error

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import os import os
import sys import sys

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import servicemanager # @UnresolvedImport, pylint: disable=import-error import servicemanager # @UnresolvedImport, pylint: disable=import-error
import logging import logging

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
import os import os
import locale import locale
@ -102,12 +102,12 @@ def getWindowsVersion():
''' '''
Returns Windows version. Returns Windows version.
''' '''
import _winreg import winreg
reg = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion') reg = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion')
try: try:
data = '{} {}'.format(_winreg.QueryValueEx(reg, 'ProductName')[0], _winreg.QueryValueEx(reg, 'ReleaseId')[0]) data = '{} {}'.format(winreg.QueryValueEx(reg, 'ProductName')[0], winreg.QueryValueEx(reg, 'ReleaseId')[0])
except Exception: except Exception:
data = '{} {}'.format(_winreg.QueryValueEx(reg, 'ProductName')[0], _winreg.QueryValueEx(reg, 'CurrentBuildNumber')[0]) data = '{} {}'.format(winreg.QueryValueEx(reg, 'ProductName')[0], winreg.QueryValueEx(reg, 'CurrentBuildNumber')[0])
reg.Close() reg.Close()
return data return data
@ -200,7 +200,7 @@ def joinDomain(domain, ou, account, password, executeInOneStep=False):
error = getErrorMessage(res) error = getErrorMessage(res)
if res == 1355: if res == 1355:
error = "DC Is not reachable" error = "DC Is not reachable"
print('{} {}'.format(res, error)) print(('{} {}'.format(res, error)))
raise Exception('Error joining domain {}, with credentials {}/*****{}: {}, {}'.format(domain.value, account.value, ', under OU {}'.format(ou.value) if ou.value is not None else '', res, error)) raise Exception('Error joining domain {}, with credentials {}/*****{}: {}, {}'.format(domain.value, account.value, ', under OU {}'.format(ou.value) if ou.value is not None else '', res, error))

View File

@ -29,7 +29,7 @@
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
# pylint: disable=unused-wildcard-import,wildcard-import # pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals
class ClientWorker(object): class ClientWorker(object):
''' '''

View File

@ -29,7 +29,7 @@
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
# pylint: disable=unused-wildcard-import,wildcard-import # pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals
class ServerWorker(object): class ServerWorker(object):
''' '''

View File

@ -3,7 +3,7 @@ Created on Jul 9, 2015
@author: dkmaster @author: dkmaster
''' '''
from __future__ import unicode_literals, print_function
# Pydev can't parse "six.moves.xxxx" because it is loaded lazy # Pydev can't parse "six.moves.xxxx" because it is loaded lazy
from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
from opengnsys.workers import ClientWorker from opengnsys.workers import ClientWorker

View File

@ -1,2 +1,2 @@
# Module must be imported on package, so we can initialize and load it # Module must be imported on package, so we can initialize and load it
from sample1 import Sample1 from .sample1 import Sample1

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
from opengnsys.workers import ServerWorker from opengnsys.workers import ServerWorker

View File

@ -29,7 +29,7 @@
''' '''
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
from __future__ import unicode_literals
def test(): def test():

View File

@ -30,7 +30,7 @@
@author: Adolfo Gómez, dkmaster at dkmon dot com @author: Adolfo Gómez, dkmaster at dkmon dot com
''' '''
# pylint: disable=unused-wildcard-import,wildcard-import # pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals, print_function
# Pydev can't parse "six.moves.xxxx" because it is loaded lazy # Pydev can't parse "six.moves.xxxx" because it is loaded lazy
from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport