Skip to content

Commit

Permalink
Fixing live stats crash on first run (#4088)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfreivasc authored and solderzzc committed Aug 16, 2016
1 parent 0c5da81 commit 46c1b28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@
* Quantra
* pmquan
* net8q
* SyncX
18 changes: 9 additions & 9 deletions pokemongo_bot/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class Metrics(object):
def __init__(self, bot):
self.bot = bot
self.start_time = time.time()
self.dust = {'start': None, 'latest': None}
self.xp = {'start': None, 'latest': None}
self.distance = {'start': None, 'latest': None}
self.encounters = {'start': None, 'latest': None}
self.throws = {'start': None, 'latest': None}
self.captures = {'start': None, 'latest': None}
self.visits = {'start': None, 'latest': None}
self.unique_mons = {'start': None, 'latest': None}
self.evolutions = {'start': None, 'latest': None}
self.dust = {'start': 0, 'latest': 0}
self.xp = {'start': 0, 'latest': 0}
self.distance = {'start': 0, 'latest': 0}
self.encounters = {'start': 0, 'latest': 0}
self.throws = {'start': 0, 'latest': 0}
self.captures = {'start': 0, 'latest': 0}
self.visits = {'start': 0, 'latest': 0}
self.unique_mons = {'start': 0, 'latest': 0}
self.evolutions = {'start': 0, 'latest': 0}

self.releases = 0
self.highest_cp = {'cp': 0, 'desc': ''}
Expand Down

1 comment on commit 46c1b28

@smfbrooks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the love of god, thank you. Long time coming, ezpz.

Please sign in to comment.