forked from shaba/openuds
Merge remote-tracking branch 'origin/v2.2'
This commit is contained in:
commit
5bade926b1
2
actors/src/.gitignore
vendored
2
actors/src/.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
build
|
||||
dist
|
||||
*.spec
|
||||
.idea
|
||||
*_enterprise*
|
||||
/samples/
|
||||
|
@ -61,6 +61,7 @@ class Logger(object):
|
||||
self.remoteLogger = remoteLogger
|
||||
|
||||
def log(self, level, message):
|
||||
print(level)
|
||||
if level < self.logLevel: # Skip not wanted messages
|
||||
return
|
||||
|
||||
|
@ -78,6 +78,7 @@ def initCfg():
|
||||
|
||||
|
||||
class CommonService(object):
|
||||
|
||||
def __init__(self):
|
||||
self.isAlive = True
|
||||
self.api = None
|
||||
@ -319,7 +320,7 @@ class CommonService(object):
|
||||
except Exception:
|
||||
logger.error('Couln\'t remove comms url from broker')
|
||||
|
||||
self.notifyStop()
|
||||
# self.notifyStop()
|
||||
|
||||
# ***************************************************
|
||||
# Methods that ARE overriden by linux & windows Actor
|
||||
|
@ -34,11 +34,10 @@ from __future__ import unicode_literals
|
||||
import servicemanager # @UnresolvedImport, pylint: disable=import-error
|
||||
import logging
|
||||
import os
|
||||
import six
|
||||
import tempfile
|
||||
|
||||
# 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):
|
||||
@ -59,7 +58,7 @@ class LocalLogger(object):
|
||||
# our loglevels are 10000 (other), 20000 (debug), ....
|
||||
# logging levels are 10 (debug), 20 (info)
|
||||
# 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
|
||||
return
|
||||
|
@ -31,13 +31,13 @@
|
||||
'''
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pickle
|
||||
from win32com.shell import shell # @UnresolvedImport, pylint: disable=import-error
|
||||
try:
|
||||
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
|
||||
except Exception: # Python3
|
||||
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 pickle
|
||||
|
||||
DEBUG = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user