diff --git a/BlenderUpdater.py b/BlenderUpdater.py index 7424abd..146bc8d 100644 --- a/BlenderUpdater.py +++ b/BlenderUpdater.py @@ -30,6 +30,7 @@ from distutils.version import StrictVersion import json import webbrowser +import logging app = QtWidgets.QApplication(sys.argv) @@ -42,6 +43,8 @@ installedversion = '' flavor = '' +logging.basicConfig(filename='BlenderUpdater.log', format='%(asctime)s:%message)s') + class WorkerThread(QtCore.QThread): update = QtCore.pyqtSignal(int) @@ -178,6 +181,7 @@ def __init__(self, parent=None): except Exception: QtWidgets.QMessageBox.critical( self, "Error", "Please check your internet connection") + logging.error('No connection') sys.exit() # Check for new version on github try: @@ -185,6 +189,7 @@ def __init__(self, parent=None): except Exception: QtWidgets.QMessageBox.critical( self, "Error", "Unable to get update information") + logging.error('Unable to get update information') UpdateData = json.load(Appupdate) applatestversion = UpdateData['tag_name'] print(UpdateData['tag_name'])