[PATCH] apibuild: Fix indentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 docs/apibuild.py | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/docs/apibuild.py b/docs/apibuild.py
index 9fa9361..18278db 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -1356,32 +1356,32 @@ class CParser:
                 token = self.token()
                 return token
             elif token[0] == "name":
-                    self.cleanupComment()
-                    if name is not None:
-                        if self.comment is not None:
-                            comment = string.strip(self.comment)
-                            self.comment = None
-                        self.enums.append((name, value, comment))
-                    name = token[1]
-                    comment = ""
+                self.cleanupComment()
+                if name is not None:
+                    if self.comment is not None:
+                        comment = string.strip(self.comment)
+                        self.comment = None
+                    self.enums.append((name, value, comment))
+                name = token[1]
+                comment = ""
+                token = self.token()
+                if token[0] == "op" and token[1][0] == "=":
+                    value = ""
+                    if len(token[1]) > 1:
+                        value = token[1][1:]
                     token = self.token()
-                    if token[0] == "op" and token[1][0] == "=":
-                        value = ""
-                        if len(token[1]) > 1:
-                            value = token[1][1:]
-                        token = self.token()
-                        while token[0] != "sep" or (token[1] != ',' and
-                              token[1] != '}'):
-                            value = value + token[1]
-                            token = self.token()
-                    else:
-                        try:
-                            value = "%d" % (int(value) + 1)
-                        except:
-                            self.warning("Failed to compute value of enum %s" % (name))
-                            value=""
-                    if token[0] == "sep" and token[1] == ",":
+                    while token[0] != "sep" or (token[1] != ',' and
+                          token[1] != '}'):
+                        value = value + token[1]
                         token = self.token()
+                else:
+                    try:
+                        value = "%d" % (int(value) + 1)
+                    except:
+                        self.warning("Failed to compute value of enum %s" % (name))
+                        value=""
+                if token[0] == "sep" and token[1] == ",":
+                    token = self.token()
             else:
                 token = self.token()
         return token
-- 
2.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]