1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-23 17:34:17 +03:00

Merge remote-tracking branch 'origin/v2.2'

This commit is contained in:
Adolfo Gómez García 2018-10-24 09:17:09 +02:00
commit 5bade926b1
5 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,6 @@
build build
dist
*.spec
.idea .idea
*_enterprise* *_enterprise*
/samples/ /samples/

View File

@ -61,6 +61,7 @@ class Logger(object):
self.remoteLogger = remoteLogger self.remoteLogger = remoteLogger
def log(self, level, message): def log(self, level, message):
print(level)
if level < self.logLevel: # Skip not wanted messages if level < self.logLevel: # Skip not wanted messages
return return

View File

@ -78,6 +78,7 @@ def initCfg():
class CommonService(object): class CommonService(object):
def __init__(self): def __init__(self):
self.isAlive = True self.isAlive = True
self.api = None self.api = None
@ -319,7 +320,7 @@ class CommonService(object):
except Exception: except Exception:
logger.error('Couln\'t remove comms url from broker') logger.error('Couln\'t remove comms url from broker')
self.notifyStop() # self.notifyStop()
# *************************************************** # ***************************************************
# Methods that ARE overriden by linux & windows Actor # Methods that ARE overriden by linux & windows Actor

View File

@ -34,11 +34,10 @@ from __future__ import unicode_literals
import servicemanager # @UnresolvedImport, pylint: disable=import-error import servicemanager # @UnresolvedImport, pylint: disable=import-error
import logging import logging
import os import os
import six
import tempfile import tempfile
# Valid logging levels, from UDS Broker (uds.core.utils.log) # Valid logging levels, from UDS Broker (uds.core.utils.log)
OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in six.moves.xrange(6)) OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in range(6))
class LocalLogger(object): class LocalLogger(object):
@ -59,7 +58,7 @@ class LocalLogger(object):
# our loglevels are 10000 (other), 20000 (debug), .... # our loglevels are 10000 (other), 20000 (debug), ....
# logging levels are 10 (debug), 20 (info) # logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET # OTHER = logging.NOTSET
self.logger.log(level / 1000 - 10, message) self.logger.log(level // 1000 - 10, message)
if level < INFO or self.serviceLogger is False: # Only information and above will be on event log if level < INFO or self.serviceLogger is False: # Only information and above will be on event log
return return

View File

@ -31,13 +31,13 @@
''' '''
from __future__ import unicode_literals from __future__ import unicode_literals
import pickle
from win32com.shell import shell # @UnresolvedImport, pylint: disable=import-error from win32com.shell import shell # @UnresolvedImport, pylint: disable=import-error
try: try:
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
except Exception: # Python3
import winreg as wreg import winreg as wreg
except ImportError: # Python 2.7 fallback
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
import win32security # @UnresolvedImport, pylint: disable=import-error import win32security # @UnresolvedImport, pylint: disable=import-error
import pickle
DEBUG = False DEBUG = False