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