Skip to content

Commit

Permalink
Fix for #4718 (#4924)
Browse files Browse the repository at this point in the history
* Add except variable

* Add except variable
  • Loading branch information
mjmadsen authored Aug 30, 2016
1 parent 56a0d11 commit daca13f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pokemongo_bot/cell_workers/telegram_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _get_player_stats(self):
try:
with open(web_inventory, "r") as infile:
json_inventory = json.load(infile)
except ValueError:
except ValueError as e:
# Unable to read json from web inventory
# File may be corrupt. Create a new one.
self.bot.logger.info('[x] Error while opening inventory file for read: %s' % e)
Expand Down
2 changes: 1 addition & 1 deletion pokemongo_bot/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def update_web_inventory(self):
try:
with open(web_inventory, "w") as outfile:
json.dump(json_inventory, outfile)
except (IOError, ValueError):
except (IOError, ValueError) as e:
self.bot.logger.info('[x] Error while opening inventory file for write: %s' % e, 'red')
pass
except:
Expand Down

0 comments on commit daca13f

Please sign in to comment.