diff --git a/client-py3/full/src/UDSClient.py b/client-py3/full/src/UDSClient.py index 90ead3f6..e1882c3a 100755 --- a/client-py3/full/src/UDSClient.py +++ b/client-py3/full/src/UDSClient.py @@ -192,21 +192,22 @@ def endScript(): try: logger.debug('Wating for tasks to finish...') tools.waitForTasks() - except Exception: - pass + except Exception as e: + logger.debug('Watiting for tasks to finish: %s', e) try: logger.debug('Unlinking files') tools.unlinkFiles() - except Exception: - pass + except Exception as e: + logger.debug('Unlinking files: %s', e) + # Removing try: logger.debug('Executing threads before exit') tools.execBeforeExit() - except Exception: - pass + except Exception as e: + logger.debug('execBeforeExit: %s', e) logger.debug('endScript done') diff --git a/client-py3/full/src/uds/tools.py b/client-py3/full/src/uds/tools.py index d59bbc3a..7b100fc2 100644 --- a/client-py3/full/src/uds/tools.py +++ b/client-py3/full/src/uds/tools.py @@ -157,6 +157,7 @@ def addTaskToWait(taks: typing.Any, includeSubprocess: bool = False) -> None: def waitForTasks() -> None: + logger.debug('Started to wait %s', _tasksToWait) for task, waitForSubp in _tasksToWait: logger.debug('Waiting for task %s, subprocess wait: %s', task, waitForSubp) try: @@ -170,8 +171,8 @@ def waitForTasks() -> None: for i in filter(lambda x: x.ppid() == task.pid, psutil.process_iter(attrs=('ppid',))): logger.debug('Found %s', i) i.wait() - except Exception: - pass + except Exception as e: + logger.error('Waiting for tasks to finish error: %s', e) def addExecBeforeExit(fnc: typing.Callable[[], None]) -> None: