1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00

Sistemato un crash

Traceback (most recent call last):
File "mifia.py", line 382, in <module>
if voter.alive:
AttributeError: 'NoneType' object has no attribute 'alive'
Partita -1001042610127 eliminata.
This commit is contained in:
Steffo 2016-04-20 17:55:32 +02:00
parent c0a6ddd157
commit 264d955fac

View file

@ -379,6 +379,7 @@ while True:
username = t['text'].split(' ') username = t['text'].split(' ')
if len(username) > 1 and g.findusername(username[1]) is not None: if len(username) > 1 and g.findusername(username[1]) is not None:
voter = g.findid(t['from']['id']) voter = g.findid(t['from']['id'])
if voter is not None:
if voter.alive: if voter.alive:
voter.votedfor = username[1] voter.votedfor = username[1]
g.message("Hai votato per " + username[1] + ".") g.message("Hai votato per " + username[1] + ".")