forked from shaba/openuds
Merge branch 'v3.5' of github.com:dkmstr/openuds into v3.5
This commit is contained in:
commit
972c48ddee
@ -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
|
# Note: Signals are only checked on python code execution, so we create a timer to force call back to python
|
||||||
timer = QTimer(qApp)
|
timer = QTimer(qApp)
|
||||||
timer.start(1000)
|
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()
|
qApp.exec()
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ import PyQt5 # pylint: disable=unused-import
|
|||||||
from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox
|
from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox
|
||||||
|
|
||||||
import udsactor
|
import udsactor
|
||||||
|
import udsactor.tools
|
||||||
|
|
||||||
from ui.setup_dialog_unmanaged_ui import Ui_UdsActorSetupDialog
|
from ui.setup_dialog_unmanaged_ui import Ui_UdsActorSetupDialog
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
from . import types
|
from . import types
|
||||||
from . import rest
|
from . import rest
|
||||||
from . import platform
|
from . import platform
|
||||||
from . import tools
|
|
||||||
|
|
||||||
__title__ = 'udsactor'
|
__title__ = 'udsactor'
|
||||||
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
||||||
|
@ -28,23 +28,23 @@
|
|||||||
'''
|
'''
|
||||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||||
'''
|
'''
|
||||||
from re import I
|
|
||||||
import threading
|
import threading
|
||||||
import ipaddress
|
import ipaddress
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
from udsactor.log import logger
|
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from udsactor.types import InterfaceInfoType
|
from udsactor.types import InterfaceInfoType
|
||||||
|
|
||||||
|
|
||||||
class ScriptExecutorThread(threading.Thread):
|
class ScriptExecutorThread(threading.Thread):
|
||||||
|
|
||||||
def __init__(self, script: str) -> None:
|
def __init__(self, script: str) -> None:
|
||||||
super(ScriptExecutorThread, self).__init__()
|
super(ScriptExecutorThread, self).__init__()
|
||||||
self.script = script
|
self.script = script
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
|
from udsactor.log import logger
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logger.debug('Executing script: {}'.format(self.script))
|
logger.debug('Executing script: {}'.format(self.script))
|
||||||
exec(self.script, globals(), None) # pylint: disable=exec-used
|
exec(self.script, globals(), None) # pylint: disable=exec-used
|
||||||
@ -69,7 +69,6 @@ def validNetworkCards(
|
|||||||
try:
|
try:
|
||||||
subnet = strToNoIPV4Network(net)
|
subnet = strToNoIPV4Network(net)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error('Invalid network: {}'.format(e))
|
|
||||||
subnet = None
|
subnet = None
|
||||||
|
|
||||||
if subnet is None:
|
if subnet is None:
|
||||||
|
@ -35,7 +35,6 @@ import tempfile
|
|||||||
import typing
|
import typing
|
||||||
|
|
||||||
import servicemanager
|
import servicemanager
|
||||||
from udsactor import service # pylint: disable=import-error
|
|
||||||
|
|
||||||
# Valid logging levels, from UDS Broker (uds.core.utils.log).
|
# Valid logging levels, from UDS Broker (uds.core.utils.log).
|
||||||
from .. import loglevel
|
from .. import loglevel
|
||||||
|
Loading…
Reference in New Issue
Block a user