Skip to content

Commit

Permalink
Dont error for persistent teams if player is spectator
Browse files Browse the repository at this point in the history
  • Loading branch information
greghaynes committed Nov 14, 2009
1 parent 750f873 commit 6b9ad05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyscripts/xsbs/persistteam.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def persistentTeams(cn, args):
del player_pteams[:]
for p in allPlayers():
if p.team() != '':
player_pteams.append((p.cn, p.team()))
try:
player_pteams.append((p.cn, p.team()))
except ValueError:
pass
sbserver.message(notice('Persistent teams enabled'))
elif args == 'off':
del player_pteams[:]
Expand Down

0 comments on commit 6b9ad05

Please sign in to comment.