@@ -899,25 +899,22 @@ def activate(self):
899899 if doFunc :
900900 if functionTimerEntryFunction and callable (functionTimerEntryFunction ) and functionTimerCancelFunction and callable (functionTimerCancelFunction ):
901901 self .startFunctionTimer (functionTimerEntryFunction , functionTimerCancelFunction , functionTimerUseOwnThread )
902- elif self .functionStandbyRetry :
903- if NavigationInstance .instance .Scheduler :
904- self .conditionFlag = self .functionStandby # 1 Standby / 2 Online
905- if DEBUG :
906- print ("[Scheduler] Function timer postponed due to standby state." )
902+ elif self .functionStandbyRetry and NavigationInstance .instance .Scheduler :
903+ self .conditionFlag = self .functionStandby # 1 Standby / 2 Online
904+ if DEBUG :
905+ print ("[Scheduler] Function timer postponed due to standby state." )
907906
908907 return True
909908
910909 elif nextState == self .StateEnded :
911910 if DEBUG :
912911 print (f"[Scheduler] DEBUG nextState self.StateEnded / self.cancelled={ self .cancelled } / self.failed={ self .failed } " )
913- if self .timerType == TIMERTYPE .OTHER and self .function :
914- if self .cancelled :
915- if self .cancelFunction and callable (self .cancelFunction ):
916- if DEBUG :
917- print ("[Scheduler] DEBUG Call cancelFunction" )
918- self .cancelFunction ()
919- self .cancelFunction = None
920- return True
912+ if self .timerType == TIMERTYPE .OTHER and self .function and self .cancelled and self .cancelFunction and callable (self .cancelFunction ):
913+ if DEBUG :
914+ print ("[Scheduler] DEBUG Call cancelFunction" )
915+ self .cancelFunction ()
916+ self .cancelFunction = None
917+ return True
921918 if self .afterEvent == AFTEREVENT .WAKEUP :
922919 Screens .Standby .TVinStandby .skipHdmiCecNow ("wakeuppowertimer" )
923920 if Screens .Standby .inStandby :
0 commit comments