From: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
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(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
---
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