Browse Source

fixed a small bug when no users on server

master
Jared Dunbar 4 years ago
parent
commit
a84fb51031
Signed by: jared GPG Key ID: CF202CC859BAC692
  1. 7
      status/update.py

7
status/update.py

@ -46,8 +46,11 @@ while 1:
playerList = [] # list of pairs of ("name", "uuid")
status = server.status()
for player in status.players.sample:
playerList.append((player.name, player.id))
try:
for player in status.players.sample:
playerList.append((player.name, player.id))
except:
pass
output = "<p class=\"indent\">Number of Players Online: {}</p>\n".format(status.players.online)
output += makeTable(playerList)

Loading…
Cancel
Save