[PATCH python 1/5] libvirt_qemu/lxc: import 'sys' package

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

 



From: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>

This fixes the pylint [1] warning "E: 25,16: Undefined variable
'sys' (undefined-variable)".

[1] https://www.pylint.org/

Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
---
 generator.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/generator.py b/generator.py
index 74150b72388f..66c53d11d399 100755
--- a/generator.py
+++ b/generator.py
@@ -1828,6 +1828,8 @@ def qemuBuildWrappers(module):
     fd.write("# Automatically written part of python bindings for libvirt\n")
     fd.write("#\n")
 
+    fd.write("import sys\n")
+
     fd.write("try:\n")
     fd.write("    import libvirtmod_qemu\n")
     fd.write("except ImportError:\n")
@@ -1951,6 +1953,8 @@ def lxcBuildWrappers(module):
     if extra is not None:
         extra.close()
 
+    fd.write("import sys\n")
+
     fd.write("try:\n")
     fd.write("    import libvirtmod_lxc\n")
     fd.write("except ImportError:\n")
-- 
2.13.4

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