diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-07-16 16:19:34 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-07-29 10:20:41 +0200 |
commit | 6a8f2e849415f111279f28bd91533fb302151125 (patch) | |
tree | 497c22fa1fc1c3fc413c10e1cb6b175b8024de5b /bin | |
parent | a922e60837ac904beff43a0efc76d94bb8b861b3 (diff) |
tracker_service.py: evaluate dict items as a list
In python3 this is an iterator, which breaks when the dict
is modified. To avoid that, force it to be evaluated as a
list.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tracker_service.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/tracker_service.py b/bin/tracker_service.py index 2dbfcd55f3..fd13b62534 100755 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -37,7 +37,7 @@ def clean_dict(d): This alters the input so you may wish to ``copy`` the dict first. """ # d.iteritems isn't used as you can't del or the iterator breaks. - for key, value in d.items(): + for key, value in list(d.items()): if value is None: del d[key] elif isinstance(value, dict): |