From 96d7146daf4a56b64318c467373e23f7e9861ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Tue, 30 May 2023 21:43:10 +0200 Subject: [PATCH] Added client log in case of exception --- client-py3/full/src/UDSClient.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client-py3/full/src/UDSClient.py b/client-py3/full/src/UDSClient.py index 6e53d4e86..09c3e1469 100755 --- a/client-py3/full/src/UDSClient.py +++ b/client-py3/full/src/UDSClient.py @@ -38,7 +38,7 @@ import webbrowser import threading import typing -from uds.ui import QtCore, QtWidgets, QtGui, QSettings, Ui_MainWindow +from uds.ui import QtCore, QtWidgets, QtGui, QSettings, Ui_MainWindow # type: ignore from uds.rest import RestApi, RetryException, InvalidVersion # Just to ensure there are available on runtime @@ -145,6 +145,8 @@ class UDSClient(QtWidgets.QMainWindow): # type: ignore self.closeWindow() return except Exception as e: # pylint: disable=broad-exception-caught + if logger.getEffectiveLevel() == 10: + logger.exception('Get Version') self.showError(e) self.closeWindow() return @@ -175,7 +177,8 @@ class UDSClient(QtWidgets.QMainWindow): # type: ignore # Retry operation in ten seconds QtCore.QTimer.singleShot(10000, self.getTransportData) except Exception as e: # pylint: disable=broad-exception-caught - logger.exception('Error getting transport data') + if logger.getEffectiveLevel() == 10: + logger.exception('Get Transport Data') self.showError(e) def start(self):