From c7c852caaaf22bc7d4088a8542a0da21ce89a2db Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Mon, 21 Jan 2013 16:27:47 +0100 Subject: [PATCH] Set source outside the loop. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b540ece4e..77b0aa9d3 100755 --- a/setup.py +++ b/setup.py @@ -265,8 +265,9 @@ class picard_build_ui(Command): log.info("compiling %s -> %s", uifile, pyfile) tmp = StringIO() uic.compileUi(uifile, tmp) + source = tmp.getvalue() for r in list(_translate_re): - source = r.sub(r'_(\1)', tmp.getvalue()) + source = r.sub(r'_(\1)', source) f = open(pyfile, "w") f.write(source) f.close()