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
|
global DELAYED, QUESTIONS, LASTQUESTION
|
||||||
|
|
||||||
if self.bfrseen is not None:
|
if self.bfrseen is not None:
|
||||||
seen = datetime.now() - self.bfrseen
|
try:
|
||||||
rnd = random.randint(0, int(seen.seconds/90))
|
seen = datetime.now() - self.bfrseen
|
||||||
|
rnd = random.randint(0, int(seen.seconds/90))
|
||||||
|
except:
|
||||||
|
rnd = 1
|
||||||
else:
|
else:
|
||||||
rnd = 1
|
rnd = 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user