Commit 03b9ffbf authored by Chris Lamb's avatar Chris Lamb 💬

Catch tracebacks when mounting invalid filesystem images under guestfs.

parent fc3762e4
Pipeline #36519 passed with stage
in 15 minutes and 21 seconds
......@@ -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], '/')
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
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