projects
/
dak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f172f9c
)
Use foo.iteritems() to avoid reentrancy with foo[k].
author
Chris Lamb
<lamby@debian.org>
Fri, 30 Oct 2009 13:52:08 +0000
(13:52 +0000)
committer
Chris Lamb
<lamby@debian.org>
Fri, 30 Oct 2009 14:29:58 +0000
(14:29 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
daklib/utils.py
patch
|
blob
|
history
diff --git
a/daklib/utils.py
b/daklib/utils.py
index 70500ad7aa814de5d6d6656f4b2a20fe04daf278..276ca2428fbfbf1e225785e99947418ce9469535 100755
(executable)
--- 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.key
s():
- template = template.replace(
x, str(subst_map[x]
))
+ for
k, v in subst_map.iteritem
s():
+ template = template.replace(
k, str(v
))
templatefile.close()
return template