Fix error in list_players
If a list of roles is passed to list_players, the function breaks if there aren't any alive players with that role and emits a stacktrace. Unsure of what this actually affects, but I saw it in the console a bunch of times.
This commit is contained in:
parent
59c589f3e1
commit
8a64f73715
@ -218,8 +218,11 @@ def list_players(roles = None):
|
||||
for x in roles:
|
||||
if x in TEMPLATE_RESTRICTIONS.keys():
|
||||
continue
|
||||
for p in ROLES[x]:
|
||||
pl.append(p)
|
||||
try:
|
||||
for p in ROLES[x]:
|
||||
pl.append(p)
|
||||
except KeyError:
|
||||
pass
|
||||
return pl
|
||||
|
||||
def list_players_and_roles():
|
||||
|
Loading…
Reference in New Issue
Block a user