summaryrefslogtreecommitdiff
path: root/SteamAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'SteamAPI.py')
-rw-r--r--SteamAPI.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/SteamAPI.py b/SteamAPI.py
index a992e68..63b79c6 100644
--- a/SteamAPI.py
+++ b/SteamAPI.py
@@ -88,6 +88,7 @@ class SteamAPI():
for player in jsondata['response']['players']:
currentid = player['steamid']
+ self.sanitizePlayer(player)
profile[currentid] = player
if CACHE:
@@ -346,6 +347,11 @@ class SteamAPI():
return profiles
+ @staticmethod
+ def sanitizePlayer(player):
+ if 'lastlogoff' not in player:
+ player['lastlogoff'] = -1
+
if __name__ == "__main__":
# TODO(andre): Maybe run tests here?
print('This is a module.')