[Spice-devel,v2,04/43] codegen: Optimize code indentation avoiding loop

Submitted by Frediano Ziglio on July 8, 2015, 1:53 p.m.

Details

Message ID 1436363656-4266-5-git-send-email-fziglio@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 8, 2015, 1:53 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 python_modules/codegen.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

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