Skip to content

Commit

Permalink
some basic logging for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kummer committed Aug 28, 2017
1 parent 44169fc commit c2148e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BlenderUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from distutils.version import StrictVersion
import json
import webbrowser
import logging


app = QtWidgets.QApplication(sys.argv)
Expand All @@ -42,6 +43,8 @@
installedversion = ''
flavor = ''

logging.basicConfig(filename='BlenderUpdater.log', format='%(asctime)s:%message)s')


class WorkerThread(QtCore.QThread):
update = QtCore.pyqtSignal(int)
Expand Down Expand Up @@ -178,13 +181,15 @@ 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:
Appupdate = urllib.request.urlopen('https://api.github.com/repos/tobkum/BlenderUpdater/releases/latest')
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'])
Expand Down

0 comments on commit c2148e5

Please sign in to comment.