summaryrefslogtreecommitdiffstats
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
commit553be710677bd450b00abb4a95680b506bfcb574 (patch)
tree3e295ee6a76fbe67d706506bf53bd90e92e5e6f9
parent233c463e3461c5846f125b25c37c6f74b36f1f3c (diff)
downloadspice-protocol-553be710677bd450b00abb4a95680b506bfcb574.tar.gz
spice-protocol-553be710677bd450b00abb4a95680b506bfcb574.tar.xz
spice-protocol-553be710677bd450b00abb4a95680b506bfcb574.zip
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