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

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
No related branches found
No related tags found
No related merge requests found
Pipeline #33039 failed
...@@ -22,6 +22,7 @@ import logging ...@@ -22,6 +22,7 @@ import logging
import os.path import os.path
from diffoscope.difference import Difference from diffoscope.difference import Difference
from diffoscope.exc import ContainerExtractionError
from .utils.file import File from .utils.file import File
from .utils.archive import Archive from .utils.archive import Archive
...@@ -71,8 +72,10 @@ class FsImageContainer(Archive): ...@@ -71,8 +72,10 @@ class FsImageContainer(Archive):
def extract(self, member_name, dest_dir): def extract(self, member_name, dest_dir):
dest_path = os.path.join(dest_dir, member_name) dest_path = os.path.join(dest_dir, member_name)
logger.debug('filesystem image extracting to %s', dest_path) 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 return dest_path
......
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