From c2148e53c8d4964031d2aca941b2167dedb5e314 Mon Sep 17 00:00:00 2001 From: Tobias Kummer Date: Mon, 28 Aug 2017 14:27:07 +0200 Subject: [PATCH] some basic logging for debugging purposes --- BlenderUpdater.py | 5 +++++ 1 file changed, 5 insertions(+) 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'])