summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-07-16 16:19:34 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-07-29 10:20:41 +0200
commit6a8f2e849415f111279f28bd91533fb302151125 (patch)
tree497c22fa1fc1c3fc413c10e1cb6b175b8024de5b /bin
parenta922e60837ac904beff43a0efc76d94bb8b861b3 (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-xbin/tracker_service.py2
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):

© 2014-2024 Faster IT GmbH | imprint | privacy policy