
Signed-off-by: Lucio Correia <luciojhc@linux.vnet.ibm.com> --- i18n.py | 2 +- imageinfo.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n.py b/i18n.py index 4a754b6..6b4b126 100644 --- a/i18n.py +++ b/i18n.py @@ -54,7 +54,7 @@ messages = { "Details: %(err)s" ), "KCHISO0009E": _("Unable to access remote ISO. Details: %(err)s"), - "KCHIMG0001E": _("An error occurred when probing image OS information."), + "KCHIMG0001E": _("Error probing image OS information: %(err)s"), "KCHIMG0003E": _("Unable to read image file %(filename)s"), "KCHIMG0004E": _("Image file must be an existing file on system. %(filename)s is not a valid input."), diff --git a/imageinfo.py b/imageinfo.py index 30c08ae..1328945 100644 --- a/imageinfo.py +++ b/imageinfo.py @@ -55,8 +55,8 @@ def probe_image(image_path): roots = g.inspect_os() except ImportError: return ("unknown", "unknown") - except: - raise ImageFormatError("KCHIMG0001E") + except Exception, e: + raise ImageFormatError("KCHIMG0001E", {'err': str(e)}) if len(roots) == 0: # If we are unable to detect the OS, still add the image -- 2.7.4