Add a try/except that catch a mysterious ValueError when bfrseen is None
This commit is contained in:
parent
07681f7485
commit
e21652aed7
7
qd.py
7
qd.py
@ -408,8 +408,11 @@ class GameUpdater(threading.Thread):
|
||||
global DELAYED, QUESTIONS, LASTQUESTION
|
||||
|
||||
if self.bfrseen is not None:
|
||||
seen = datetime.now() - self.bfrseen
|
||||
rnd = random.randint(0, int(seen.seconds/90))
|
||||
try:
|
||||
seen = datetime.now() - self.bfrseen
|
||||
rnd = random.randint(0, int(seen.seconds/90))
|
||||
except:
|
||||
rnd = 1
|
||||
else:
|
||||
rnd = 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user