File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1118,14 +1118,14 @@ def _timer_set_single_shot(self):
1118
1118
def _on_timer (self ):
1119
1119
'''
1120
1120
Runs all function that have been registered as callbacks. Functions
1121
- can return False if they should not be called any more. If there
1121
+ can return False (or 0) if they should not be called any more. If there
1122
1122
are no callbacks, the timer is automatically stopped.
1123
1123
'''
1124
1124
for func , args , kwargs in self .callbacks :
1125
1125
ret = func (* args , ** kwargs )
1126
- # docstring above explains why we use `if ret is False` here,
1126
+ # docstring above explains why we use `if ret == False` here,
1127
1127
# instead of `if not ret`.
1128
- if ret is False :
1128
+ if ret == False :
1129
1129
self .callbacks .remove ((func , args , kwargs ))
1130
1130
1131
1131
if len (self .callbacks ) == 0 :
You can’t perform that action at this time.
0 commit comments