Updating new UDSClient

This commit is contained in:
Adolfo Gómez García 2021-06-19 13:29:43 +02:00
parent 3ed3f03d25
commit eed4bc5fb7
2 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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')