[PATCH v2 5/8] python3: Call list() explicitly as needed

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

 



For list concatenation to work, the value returned by the
keys() method must be converted to a list first.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 docs/apibuild.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/docs/apibuild.py b/docs/apibuild.py
index 2097400cd1..bc6c609431 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -2049,13 +2049,13 @@ class docBuilder:
         self.path = path
         self.directories = directories
         if name == "libvirt":
-            self.includes = includes + included_files.keys()
+            self.includes = includes + list(included_files.keys())
         elif name == "libvirt-qemu":
-            self.includes = includes + qemu_included_files.keys()
+            self.includes = includes + list(qemu_included_files.keys())
         elif name == "libvirt-lxc":
-            self.includes = includes + lxc_included_files.keys()
+            self.includes = includes + list(lxc_included_files.keys())
         elif name == "libvirt-admin":
-            self.includes = includes + admin_included_files.keys()
+            self.includes = includes + list(admin_included_files.keys())
         self.modules = {}
         self.headers = {}
         self.idx = index()
@@ -2383,9 +2383,12 @@ class docBuilder:
             module = self.modulename_file(file)
             output.write("    <file name='%s'>\n" % (module))
             dict = self.headers[file]
-            ids = uniq(dict.functions.keys() + dict.variables.keys() + \
-                  dict.macros.keys() + dict.typedefs.keys() + \
-                  dict.structs.keys() + dict.enums.keys())
+            ids = uniq(list(dict.functions.keys()) + \
+                       list(dict.variables.keys()) + \
+                       list(dict.macros.keys()) + \
+                       list(dict.typedefs.keys()) + \
+                       list(dict.structs.keys()) + \
+                       list(dict.enums.keys()))
             ids.sort()
             for id in ids:
                 output.write("      <ref name='%s'/>\n" % (id))
-- 
2.14.3

--
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]

  Powered by Linux