]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
docs: simplify code
authorClaudio Bley <cbley@av-test.de>
Thu, 10 Jan 2013 15:02:23 +0000 (16:02 +0100)
committerClaudio Bley <cbley@av-test.de>
Mon, 14 Jan 2013 08:18:43 +0000 (09:18 +0100)
docs/apibuild.py

index 7b336b3d5de72fd6c4f359f1e902789eaf87f84d..63b21e1f7b74d2baa2192e8f21729fc4b12ed772 100755 (executable)
@@ -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: