summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-07-21 17:45:34 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-07-23 11:11:18 +0200
commit0130e8dc396fc267027915fc8b3167b0a4497911 (patch)
treec2201a9bcd68d6f03f2592cb1422935fde7aa215
parent184feb541a86a697d263e1065e12a01c53bab289 (diff)
codegen: Optimize code indentation and avoid a loop
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--python_modules/codegen.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 55500b7..02ffdb9 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -130,8 +130,7 @@ class CodeWriter:
return
if self.at_line_start:
- for i in range(self.indentation):
- self.out.write(u" ")
+ self.out.write(u" " * self.indentation)
self.at_line_start = False
self.out.write(s)
return self