Add a try/except that catch a mysterious ValueError when bfrseen is None
This commit is contained in:
parent
07681f7485
commit
e21652aed7
1 changed files with 5 additions and 2 deletions
3
qd.py
3
qd.py
|
@ -408,8 +408,11 @@ class GameUpdater(threading.Thread):
|
|||
global DELAYED, QUESTIONS, LASTQUESTION
|
||||
|
||||
if self.bfrseen is not None:
|
||||
try:
|
||||
seen = datetime.now() - self.bfrseen
|
||||
rnd = random.randint(0, int(seen.seconds/90))
|
||||
except:
|
||||
rnd = 1
|
||||
else:
|
||||
rnd = 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue