Skip to content

Commit

Permalink
[TaskView] - while running ImageManager - crash at end of Backup in T…
Browse files Browse the repository at this point in the history
…askView - so add a sanity check to prevent key_blue crash
  • Loading branch information
Tony Whalley committed Dec 7, 2023
1 parent 874199e commit 19653b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/python/Screens/TaskView.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ def state_changed(self):
self["summary_job_task"].text = j.getStatustext()
if j.status in (j.FINISHED, j.FAILED):
self.performAfterEvent()
self.backgroundable = False
self["key_blue"].setText("")
self["backgroundActions"].setEnabled(False)
if self.backgroundable:
self.backgroundable = False
self["key_blue"].setText("")
self["backgroundActions"].setEnabled(False)
if j.status == j.FINISHED:
self["key_green"].setText(_("OK"))
self["okActions"].setEnabled(True)
Expand Down Expand Up @@ -160,7 +161,7 @@ def performAfterEvent(self):
return
elif self.settings.afterEvent.value == "close" and self.job.status == self.job.FINISHED:
self.close(False)
if self.settings.afterEvent.value == "deepstandby":
elif self.settings.afterEvent.value == "deepstandby":
if not Screens.Standby.inTryQuitMainloop:
Tools.Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A sleep timer wants to shut down\nyour %s %s. Proceed?") % (getMachineBrand(), getMachineName()), timeout=20)
elif self.settings.afterEvent.value == "standby":
Expand Down

0 comments on commit 19653b4

Please sign in to comment.