Skip to content

Commit 8ac4aba

Browse files
author
Pietro Albini
committed
Fix exception if an optional arg was None in the internal API
The arg when_stop of updates.UpdatesFetcher.block_until_alone should be supposed to also be None, but that resulted in an exception before this commit.
1 parent 866b895 commit 8ac4aba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

botogram/updates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def block_until_alone(self, treshold=4, check_timeout=1, when_stop=None):
123123

124124
while checks_count < treshold:
125125
# This provides an artificial end to the blocking
126-
if when_stop():
126+
if when_stop is not None and when_stop():
127127
return False
128128

129129
try:

0 commit comments

Comments
 (0)