Commit 6b8e47dd authored by Chris Lamb's avatar Chris Lamb 💬

Really avoid crashing if we unable to if we were unable to successfully...

Really avoid crashing if we unable to if we were unable to successfully extract a "guestfs"-based file. (Re: #901982)

Gbp-Dch: ignore
parent dda77130
Pipeline #33688 failed with stage
in 14 minutes and 58 seconds
......@@ -67,15 +67,14 @@ class FsImageContainer(Archive):
self.g.close()
def get_member_names(self):
if not guestfs:
return []
return [os.path.basename(self.source.path) + '.tar']
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)
try:
self.g.tar_out('/', dest_path)
except AttributeError as exc:
raise ContainerExtractionError(member_name, exc)
self.g.tar_out('/', dest_path)
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