From 34c082916bb247ab93b6932fea95cf324c427b7e Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Fri, 30 Oct 2009 13:52:08 +0000 Subject: [PATCH] Use foo.iteritems() to avoid reentrancy with foo[k]. Signed-off-by: Chris Lamb --- daklib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daklib/utils.py b/daklib/utils.py index 70500ad7..276ca242 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 -- 2.39.5