[diffoscope] [PATCH] early exit close_archive if no guestfs is available
Levente Polyak
levente at leventepolyak.net
Sun Dec 6 21:35:03 CET 2015
This fixes a possible regression when closing an opened fsimage container when no
guestfs is available.
---
diffoscope/comparators/fsimage.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/diffoscope/comparators/fsimage.py b/diffoscope/comparators/fsimage.py
index 35980ee..3dfeffa 100644
--- a/diffoscope/comparators/fsimage.py
+++ b/diffoscope/comparators/fsimage.py
@@ -47,6 +47,8 @@ class FsImageContainer(Archive):
return self
def close_archive(self):
+ if not guestfs:
+ return None
self.g.umount_all()
self.g.close()
--
2.6.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20151206/d5786890/attachment.sig>
More information about the diffoscope
mailing list