Commit d05e19af authored by Nikos Skalkotos's avatar Nikos Skalkotos

Fix a closed libguestfs handler bug

Fix a bug that affects newer versions of libguestfs where the handler
is erroneously closed in disable_guestfs
parent 0af5ede5
......@@ -174,10 +174,13 @@ class Image(object):
# process was introduced in version 1.19.16
if self.check_guestfs_version(1, 19, 16) >= 0:
self.g.shutdown()
self.g.close()
else:
self.g.kill_subprocess()
# We will reset the guestfs handler if needed
if self.check_guestfs_version(1, 18, 4) < 0:
self.g.close()
self.guestfs_enabled = False
self.out.success('done')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment