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 | 122e1e72906e9ce0f3efff3c624aa14834753bb4 (patch) | |
tree | d496be87efd6c58eb78742aee3853e1ef0f75d88 /bin | |
parent | 3c14e54f5d649c89a5face52c6fe1cde6fbee923 (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): |