From 122e1e72906e9ce0f3efff3c624aa14834753bb4 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Thu, 16 Jul 2020 16:19:34 +0200 Subject: 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. --- bin/tracker_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') 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): -- cgit v1.2.3