Skip to content

Commit

Permalink
Python3 fix
Browse files Browse the repository at this point in the history
It's not possible to edit a dictionary while iterating over it in Python3.
The work-around is to use `list(d)` to force a copy.
  • Loading branch information
Sam Brown authored and Sam Brown committed Feb 24, 2016
1 parent 3a46774 commit 8e91f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_analytics/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def build_source(self, config):
if 'ENABLED' in args:
del args['ENABLED']

for key in args:
for key in list(args):
args[key.lower()] = args.pop(key)

instance = self.provider_map[provider](**args)
Expand Down

0 comments on commit 8e91f15

Please sign in to comment.