mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +03:00
Fixed logger on Windows (import mistake)
This commit is contained in:
parent
3a4d571a6c
commit
18c5e3a242
@ -67,7 +67,7 @@ if __name__ == "__main__":
|
||||
# Note: Signals are only checked on python code execution, so we create a timer to force call back to python
|
||||
timer = QTimer(qApp)
|
||||
timer.start(1000)
|
||||
timer.timeout.connect(lambda *a: None) # timeout can be connected to a callable
|
||||
timer.timeout.connect(lambda *a: None) # type: ignore # timeout can be connected to a callable
|
||||
|
||||
qApp.exec()
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
from . import types
|
||||
from . import rest
|
||||
from . import platform
|
||||
from . import tools
|
||||
|
||||
__title__ = 'udsactor'
|
||||
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
||||
|
@ -28,23 +28,23 @@
|
||||
'''
|
||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
'''
|
||||
from re import I
|
||||
import threading
|
||||
import ipaddress
|
||||
import typing
|
||||
|
||||
from udsactor.log import logger
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from udsactor.types import InterfaceInfoType
|
||||
|
||||
|
||||
class ScriptExecutorThread(threading.Thread):
|
||||
|
||||
def __init__(self, script: str) -> None:
|
||||
super(ScriptExecutorThread, self).__init__()
|
||||
self.script = script
|
||||
|
||||
def run(self) -> None:
|
||||
from udsactor.log import logger
|
||||
|
||||
try:
|
||||
logger.debug('Executing script: {}'.format(self.script))
|
||||
exec(self.script, globals(), None) # pylint: disable=exec-used
|
||||
@ -69,7 +69,6 @@ def validNetworkCards(
|
||||
try:
|
||||
subnet = strToNoIPV4Network(net)
|
||||
except Exception as e:
|
||||
logger.error('Invalid network: {}'.format(e))
|
||||
subnet = None
|
||||
|
||||
if subnet is None:
|
||||
|
@ -35,7 +35,6 @@ import tempfile
|
||||
import typing
|
||||
|
||||
import servicemanager
|
||||
from udsactor import service # pylint: disable=import-error
|
||||
|
||||
# Valid logging levels, from UDS Broker (uds.core.utils.log).
|
||||
from .. import loglevel
|
||||
|
Loading…
Reference in New Issue
Block a user