mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
docs: simplify code
This commit is contained in:
parent
10370efb29
commit
833e1493ed
@ -654,17 +654,11 @@ class CParser:
|
||||
lines = string.split(comment, "\n")
|
||||
item = None
|
||||
for line in lines:
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
while line != "" and line[0] == '*':
|
||||
line = line[1:]
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
line = line.lstrip().lstrip('*').lstrip()
|
||||
try:
|
||||
(it, line) = string.split(line, ":", 1)
|
||||
item = it
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
line = line.lstrip()
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user