py3: iterate over a copy of dict while changing it
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 14 Apr 2018 01:58:44 +0530
changeset 37662 5340daa85c62
parent 37661 afe624d78d43
child 37663 fc114a16a484
py3: iterate over a copy of dict while changing it Differential Revision: https://phab.mercurial-scm.org/D3323
mercurial/color.py
--- a/mercurial/color.py	Sat Apr 14 00:56:44 2018 +0530
+++ b/mercurial/color.py	Sat Apr 14 01:58:44 2018 +0530
@@ -168,7 +168,7 @@
         ui._terminfoparams.clear()
         return
 
-    for key, (b, e, c) in ui._terminfoparams.items():
+    for key, (b, e, c) in ui._terminfoparams.copy().items():
         if not b:
             continue
         if not c and not curses.tigetstr(e):