From eed4bc5fb70468642a77eaf6a21dd439445de176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Sat, 19 Jun 2021 13:29:43 +0200 Subject: [PATCH] Updating new UDSClient --- client-py3/full/src/UDSClient.py | 2 +- client-py3/full/src/uds/log.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client-py3/full/src/UDSClient.py b/client-py3/full/src/UDSClient.py index 16b59ffb..2a98a22b 100755 --- a/client-py3/full/src/UDSClient.py +++ b/client-py3/full/src/UDSClient.py @@ -266,7 +266,7 @@ class UDSClient(QtWidgets.QMainWindow): approved = settings.value(serial, False) - if approved or QMessageBox.warning(self, 'SSL Warning', errorString, QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: # type: ignore + if approved or QtWidgets.QMessageBox.warning(self, 'SSL Warning', errorString, QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: # type: ignore approved = True settings.setValue(serial, True) diff --git a/client-py3/full/src/uds/log.py b/client-py3/full/src/uds/log.py index 047f6d36..aee57986 100644 --- a/client-py3/full/src/uds/log.py +++ b/client-py3/full/src/uds/log.py @@ -36,6 +36,8 @@ import os import sys import tempfile +LOGLEVEL = logging.INFO + if sys.platform.startswith('linux'): from os.path import expanduser # pylint: disable=ungrouped-imports logFile = expanduser('~/udsclient.log') @@ -47,9 +49,9 @@ try: filename=logFile, filemode='a', format='%(levelname)s %(asctime)s %(message)s', - level=logging.INFO + level=LOGLEVEL ) except Exception: - logging.basicConfig(format='%(levelname)s %(asctime)s %(message)s', level=logging.INFO) + logging.basicConfig(format='%(levelname)s %(asctime)s %(message)s', level=LOGLEVEL) logger = logging.getLogger('udsclient')