Skip to content

Commit

Permalink
Updates: Report Spyder updates even if an error occurs at startup
Browse files Browse the repository at this point in the history
Otherwise the "Check for updates" action in the Help menu would always
appear as disabled to users.
  • Loading branch information
ccordoba12 committed Mar 9, 2024
1 parent 8a5ceeb commit ff5a846
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions spyder/workers/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,14 @@ def start(self):
).format(formatted_error)
logger.debug(err, stack_info=True)

# Don't show dialog when starting up spyder and an error occur
if not (self.startup and error_msg is not None):
self.error = error_msg
try:
self.sig_ready.emit()
except RuntimeError:
pass
# At this point we **must** emit the signal below so that the "Check
# for updates" action in the Help menu is enabled again after the check
# has finished (it's disabled while the check is running).
self.error = error_msg
try:
self.sig_ready.emit()
except RuntimeError:
pass


class WorkerDownloadInstaller(QObject):
Expand Down Expand Up @@ -336,6 +337,7 @@ def start(self):
'<tt>{}</tt>'
).format(formatted_error)
logger.debug(err, stack_info=True)

self.error = error_msg
try:
self.sig_ready.emit(self.installer_path)
Expand Down

0 comments on commit ff5a846

Please sign in to comment.