Skip to content

Commit

Permalink
Fix fresh installs (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
aw-was-here authored Jun 15, 2023
1 parent eaee74a commit e5b5312
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions nowplaying/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,14 @@ def upgrade(bundledir=None):

try:
upgradebin = nowplaying.upgradeutils.UpgradeBinary()
data = upgradebin.get_upgrade_data()
if not data:
return

dialog = UpgradeDialog()
dialog.fill_it_in(upgradebin.myversion, data['tag_name'])
if dialog.exec():
webbrowser.open(data['html_url'])
logging.info('User wants to upgrade; exiting')
sys.exit(0)
if data:= upgradebin.get_upgrade_data():
dialog = UpgradeDialog()
dialog.fill_it_in(upgradebin.myversion, data['tag_name'])
if dialog.exec():
webbrowser.open(data['html_url'])
logging.info('User wants to upgrade; exiting')
sys.exit(0)
except Exception as error: # pylint: disable=broad-except
logging.error(error)

Expand Down

0 comments on commit e5b5312

Please sign in to comment.