[PATCH python 01/15] generator: Don't use 'list' as a variable name

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

In python3 if we use 'list' as a variable name it causes it
to hide the corresponding 'list()' function from the entire
function that holds the variable.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 generator.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/generator.py b/generator.py
index a9f98ab..a40ed11 100755
--- a/generator.py
+++ b/generator.py
@@ -1434,8 +1434,8 @@ def buildWrappers(module):
                 else:
                     classes.write("    def __init__(self, _obj=None):\n")
                 if reference_keepers.has_key(classname):
-                    list = reference_keepers[classname]
-                    for ref in list:
+                    rlist = reference_keepers[classname]
+                    for ref in rlist:
                         classes.write("        self.%s = None\n" % ref[1])
                 if classname in [ "virDomain", "virNetwork", "virInterface",
                                   "virNodeDevice", "virSecret", "virStream",
@@ -1589,8 +1589,8 @@ def buildWrappers(module):
                         #
                         tclass = classes_type[ret[0]][2]
                         if reference_keepers.has_key(tclass):
-                            list = reference_keepers[tclass]
-                            for pref in list:
+                            rlist = reference_keepers[tclass]
+                            for pref in rlist:
                                 if pref[0] == classname:
                                     classes.write("        __tmp.%s = self\n" %
                                                   pref[1])
-- 
1.8.3.1

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