Show qemu-img stdout in case of an error.

This commit is contained in:
grossmj committed 2017-11-17 18:13:34 +07:00
1 parent cf14deb2fa
commit 035a078b5e
3 files changed
+32 -9

No files matched your search

+2 -2
View File
@@ -537,8 +537,8 @@ class BaseManager:
directory = self.get_images_directory()
path = os.path.abspath(os.path.join(directory, *os.path.split(filename)))
if os.path.commonprefix([directory, path]) != directory:
raise aiohttp.web.HTTPForbidden(text="Could not write image: {}, {} is forbiden".format(filename, path))
log.info("Writting image file %s", path)
raise aiohttp.web.HTTPForbidden(text="Could not write image: {}, {} is forbidden".format(filename, path))
log.info("Writing image file %s", path)
try:
remove_checksum(path)
# We store the file under his final name only when the upload is finished