[Git][reproducible-builds/diffoscope][master] Catch tracebacks when mounting invalid filesystem images under guestfs.

Chris Lamb gitlab at salsa.debian.org
Fri Feb 15 09:14:57 CET 2019


Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
03b9ffbf by Chris Lamb at 2019-02-15T08:14:43Z
Catch tracebacks when mounting invalid filesystem images under guestfs.

- - - - -


1 changed file:

- diffoscope/comparators/fsimage.py


Changes:

=====================================
diffoscope/comparators/fsimage.py
=====================================
@@ -56,7 +56,11 @@ class FsImageContainer(Archive):
                          "with LIBGUESTFS_MEMSIZE=256 or lower.")
             return None
         devices = self.g.list_devices()
-        self.g.mount(devices[0], '/')
+        try:
+            self.g.mount(devices[0], '/')
+        except RuntimeError:
+            logger.exception("guestfs count not mount image; invalid file?")
+            return None
         self.fs = self.g.list_filesystems()[devices[0]]
         return self
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/03b9ffbf781543484801647d7932e34409828004

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/03b9ffbf781543484801647d7932e34409828004
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190215/df0ddbb2/attachment.html>


More information about the rb-commits mailing list