Skip to content
Snippets Groups Projects
Commit 03b9ffbf authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Catch tracebacks when mounting invalid filesystem images under guestfs.

parent fc3762e4
No related branches found
No related tags found
No related merge requests found
Pipeline #36519 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment