Fix potential infinite loop in python generator

* python/generator.py: fix an infinite loop bug
Daniel
This commit is contained in:
Daniel Veillard
2008-04-08 08:26:15 +00:00
parent 7c61b48202
commit 2579443e21
2 changed files with 7 additions and 0 deletions

View File

@@ -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: