summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/main.py b/main.py
index 1fef7cc..187ceec 100755
--- a/main.py
+++ b/main.py
@@ -188,15 +188,17 @@ def server():
for _, serverdata in servers.items():
name = "{0}{1:d}{2:d}".format(serverdata['ip'], serverdata['port'], serverdata['gameid'])
serverdata['data'] = serverdata_[name].result()
- serverdata_['u' + name] = executor.submit(
- steam.getGameUpdateState,
- serverdata['data']['gameid'],
- serverdata['data']['gameversion']
- )
+ if serverdata['data']:
+ serverdata_['u' + name] = executor.submit(
+ steam.getGameUpdateState,
+ serverdata['data']['gameid'],
+ serverdata['data']['gameversion'],
+ )
for _, serverdata in servers.items():
name = "{0}{1:d}{2:d}".format(serverdata['ip'], serverdata['port'], serverdata['gameid'])
- serverdata['update'] = serverdata_['u' + name].result()
+ if 'u' + name in serverdata_:
+ serverdata['update'] = serverdata_['u' + name].result()
return render_template('server_html.jinja',
servers=servers,