[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 16/23] Use foo.iteritems() to avoid reentrancy with foo[k].



Signed-off-by: Chris Lamb <lamby@debian.org>
---
 daklib/utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 70500ad..276ca24 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -759,8 +759,8 @@ def TemplateSubst(subst_map, filename):
     """ Perform a substition of template """
     templatefile = open_file(filename)
     template = templatefile.read()
-    for x in subst_map.keys():
-        template = template.replace(x, str(subst_map[x]))
+    for k, v in subst_map.iteritems():
+        template = template.replace(k, str(v))
     templatefile.close()
     return template
 
-- 
1.6.3.3



Reply to: