diff --git a/version/app.py b/version/app.py index 8937b49..5ba0ae2 100644 --- a/version/app.py +++ b/version/app.py @@ -1,4 +1,4 @@ -#""" +#""" #This file is part of Happypanda. #Happypanda is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by @@ -57,8 +57,7 @@ def __init__(self): self.setAcceptDrops(True) self.initUI() self.start_up() - if not gui_constants.DEBUG: - QTimer.singleShot(3000, self._check_update) + QTimer.singleShot(3000, self._check_update) self.setFocusPolicy(Qt.NoFocus) def init_watchers(self): @@ -320,8 +319,11 @@ def fetch_vs(self): try: log_d('Checking Update') time.sleep(1.5) - r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt", - verify='cacert.pem') + if gui_constants.DEBUG: + r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt") + else: + r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt", + verify='cacert.pem') a = r.text vs = a.strip() self.UPDATE_CHECK.emit(vs) @@ -333,6 +335,7 @@ def check_update(vs): log_i('Received version: {}\nCurrent version: {}'.format(vs, gui_constants.vs)) if vs != gui_constants.vs: if len(vs) < 10: + self.notification_bar.begin_show() self.notification_bar.add_text("Version {} of Happypanda is".format(vs)+ " available. Click here to update!", False) self.notification_bar.clicked.connect(lambda: utils.open_web_link(