Skip to content

Commit

Permalink
Fix for when there are no games for the day
Browse files Browse the repository at this point in the history
  • Loading branch information
timewasted committed Dec 25, 2014
1 parent 4d96c9c commit d02635e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/lib/nhlgc.py
Expand Up @@ -305,7 +305,10 @@ def get_games_list(self, today_only=True, retry=True):
raise self.LogicError(fn_name, 'Access denied.')

try:
games_list = r_xml['result']['games']['game']
games_list = r_xml['result']['games']
if games_list is None:
return []
games_list = games_list['game']
if not isinstance(games_list, list):
games_list = [games_list]
except KeyError:
Expand Down

0 comments on commit d02635e

Please sign in to comment.