1
0
Fork 0

Add a try/except that catch a mysterious ValueError when bfrseen is None

This commit is contained in:
Némunaire 2012-05-24 20:50:07 +02:00
parent 07681f7485
commit e21652aed7
1 changed files with 5 additions and 2 deletions

7
qd.py
View File

@ -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