Fixed debian package dependency && update client tools to add some more debug info

This commit is contained in:
Adolfo Gómez García 2021-06-23 15:01:34 +02:00
parent d1fb59ab77
commit f20a5a33b0
2 changed files with 13 additions and 3 deletions

View File

@ -10,6 +10,6 @@ Package: udsclient3
Section: admin
Priority: optional
Architecture: all
Depends: python3-paramiko (>=2.0.0), python2-certifi, python3-cryptography, python3-psutil, python3-pyqt5 (>=5.0), python3 (>=3.6), freerdp2-x11 | freerdp-x11 | freerdp-nightly, desktop-file-utils, ${misc:Depends}
Depends: python3-paramiko (>=2.0.0), python3-certifi, python3-cryptography, python3-psutil, python3-pyqt5 (>=5.0), python3 (>=3.6), freerdp2-x11 | freerdp-x11 | freerdp-nightly, desktop-file-utils, ${misc:Depends}
Description: Client connector for Universal Desktop Services (UDS) Broker
This package provides the required components to allow this machine to connect to services provided by UDS Broker.

View File

@ -135,6 +135,9 @@ def addFileToUnlink(filename: str, early: bool = False) -> None:
'''
Adds a file to the wait-and-unlink list
'''
logger.debug(
'Added file %s to unlink on %s stage', filename, 'early' if early else 'later'
)
_unlinkFiles.append((filename, early))
@ -142,8 +145,10 @@ def unlinkFiles(early: bool = False) -> None:
'''
Removes all wait-and-unlink files
'''
logger.debug('Unlinking files on %s stage', 'early' if early else 'later')
filesToUnlink = list(filter(lambda x: x[1] == early, _unlinkFiles))
if filesToUnlink:
logger.debug('Files to unlink: %s', filesToUnlink)
# Wait 2 seconds before deleting anything on early and 5 on later stages
time.sleep(1 + 2 * (1 + int(early)))
@ -154,8 +159,11 @@ def unlinkFiles(early: bool = False) -> None:
logger.debug('File %s not deleted: %s', f[0], e)
def addTaskToWait(taks: typing.Any, includeSubprocess: bool = False) -> None:
_tasksToWait.append((taks, includeSubprocess))
def addTaskToWait(task: typing.Any, includeSubprocess: bool = False) -> None:
logger.debug(
'Added task %s to wait %s', task, 'with subprocesses' if includeSubprocess else ''
)
_tasksToWait.append((task, includeSubprocess))
def waitForTasks() -> None:
@ -180,10 +188,12 @@ def waitForTasks() -> None:
def addExecBeforeExit(fnc: typing.Callable[[], None]) -> None:
logger.debug('Added exec before exit: %s', fnc)
_execBeforeExit.append(fnc)
def execBeforeExit() -> None:
logger.debug('Esecuting exec before exit: %s', _execBeforeExit)
for fnc in _execBeforeExit:
fnc()