Make sure we print the error message before the finally: kicks in.

This commit is contained in:
Teo Mrnjavac 2016-04-28 16:36:46 +02:00
parent 69b72e8a76
commit 98b5085e6e

View File

@ -169,9 +169,11 @@ class UnpackOperation:
if entry.sourcefs == "squashfs": if entry.sourcefs == "squashfs":
if shutil.which("unsquashfs") is None: if shutil.which("unsquashfs") is None:
msg = ("Failed to find unsquashfs, make sure you have "
"the squashfs-tools package installed")
print(msg)
return ("Failed to unpack image", return ("Failed to unpack image",
"Failed to find unsquashfs, make sure you have " msg)
"the squashfs-tools package installed")
fslist = subprocess.check_output(["unsquashfs", "-l", entry.source]) fslist = subprocess.check_output(["unsquashfs", "-l", entry.source])