]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix potential infinite loop in python generator
authorDaniel Veillard <veillard@redhat.com>
Tue, 8 Apr 2008 08:26:15 +0000 (08:26 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 8 Apr 2008 08:26:15 +0000 (08:26 +0000)
* python/generator.py: fix an infinite loop bug
Daniel

ChangeLog
python/generator.py

index 6c37ac48a8a688aad9851dfb8d190ae2b1b0520a..f032e83356747cc47c1feda08f4e5a225504bd70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr  8 10:19:01 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+       * python/generator.py: fix an infinite loop bug
+
 Mon Apr  7 14:36:56 CET 2008 Jim Meyering <meyering@redhat.com>
 
        * tests/vcpupin: Add a test for the 2008-04-04 virsh.c bugfix.
index 578f02c8144c46c543d259dfe4a40ee834f053e2..cb57bffdf364edb34b9a4ffe631f8a9f7e6de474 100755 (executable)
@@ -754,6 +754,9 @@ def writeDoc(name, args, indent, output):
      output.write(indent)
      output.write('"""')
      while len(val) > 60:
+         if val[0] == " ":
+            val = val[1:]
+            continue
          str = val[0:60]
          i = string.rfind(str, " ");
          if i < 0: