summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2008-04-08 08:26:15 +0000
committerDaniel Veillard <veillard@redhat.com>2008-04-08 08:26:15 +0000
commit8e862ae9b27b089a75444ce85be7011e0a6a543e (patch)
tree2775ea4f09f5e127ec16a10c5ef5cd436261a993
parent8b3c382e28dfff4050f40fd018de2f4cd1ae3c77 (diff)
downloadlibvirt-python-split-8e862ae9b27b089a75444ce85be7011e0a6a543e.tar.gz
libvirt-python-split-8e862ae9b27b089a75444ce85be7011e0a6a543e.tar.xz
libvirt-python-split-8e862ae9b27b089a75444ce85be7011e0a6a543e.zip
Fix potential infinite loop in python generatorv0.4.2
* python/generator.py: fix an infinite loop bug Daniel
-rwxr-xr-xgenerator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/generator.py b/generator.py
index 578f02c..cb57bff 100755
--- a/generator.py
+++ b/generator.py
@@ -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: