Browse Source

fix exception on empty response in get_server_list

0.9
Rossen Georgiev 7 years ago
parent
commit
b9884068c6
  1. 8
      steam/client/builtins/gameservers.py

8
steam/client/builtins/gameservers.py

@ -103,12 +103,16 @@ class SteamGameServers(object):
resp = self.steam.unified_messages.send_and_wait("GameServers.GetServerList#1", {
"filter": filter_text,
"limit": max_servers,
}, timeout=30)
}, timeout=20)
if resp is None: return None
if resp is None:
return None
resp = proto_to_dict(resp)
if not resp:
return []
else:
for server in resp['servers']:
server['steamid'] = SteamID(server['steamid'])

Loading…
Cancel
Save