Skip to content

Commit

Permalink
use position in format string
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Jul 23, 2016
1 parent 2374f5b commit 08d0a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autocmake/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def replace(s, d):

if isinstance(s, str):
for var in findall(r"%\(([A-Za-z0-9_]*)\)", s):
s = s.replace("%({})".format(var), str(d[var]))
s = s.replace("%({0})".format(var), str(d[var]))
return s


Expand Down

0 comments on commit 08d0a68

Please sign in to comment.