Skip to content

Commit

Permalink
use dict.get() call when retrieving props form page
Browse files Browse the repository at this point in the history
  • Loading branch information
rowan08 committed Feb 27, 2019
1 parent 2065c56 commit cd67f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wikipedia/wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def __continued_query(self, query_params):
for datum in pages.values(): # in python 3.3+: "yield from pages.values()"
yield datum
else:
for datum in pages[self.pageid][prop]:
for datum in pages[self.pageid].get(prop, []):
yield datum

if 'continue' not in request:
Expand Down

0 comments on commit cd67f22

Please sign in to comment.