Commit dda77130 authored by Chris Lamb's avatar Chris Lamb 💬

Don't crash with if we were unable to successfully extract a "guestfs"-based...

Don't crash with if we were unable to successfully extract a "guestfs"-based file. (Closes: #901982)
parent d98c4b05
Pipeline #33039 failed with stage
in 15 minutes and 32 seconds
......@@ -22,6 +22,7 @@ import logging
import os.path
from diffoscope.difference import Difference
from diffoscope.exc import ContainerExtractionError
from .utils.file import File
from .utils.archive import Archive
......@@ -71,8 +72,10 @@ class FsImageContainer(Archive):
def extract(self, member_name, dest_dir):
dest_path = os.path.join(dest_dir, member_name)
logger.debug('filesystem image extracting to %s', dest_path)
self.g.tar_out('/', dest_path)
try:
self.g.tar_out('/', dest_path)
except AttributeError as exc:
raise ContainerExtractionError(member_name, exc)
return dest_path
......
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