From 760c2785d7e3d5ad9492d1fe87546238b7bcfc6d Mon Sep 17 00:00:00 2001 From: Adrien Ball Date: Mon, 25 Mar 2019 11:09:08 +0100 Subject: [PATCH] Improve failed linking error message after download of resources (#774) Improve linking failed message --- snips_nlu/cli/download.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/snips_nlu/cli/download.py b/snips_nlu/cli/download.py index fe439cf81..50809af64 100644 --- a/snips_nlu/cli/download.py +++ b/snips_nlu/cli/download.py @@ -83,9 +83,10 @@ def _download_and_link(resource_alias, resource_fullname, compatibility, pretty_print("%s --> %s" % (str(resources_dir), str(link_path)), title="Linking successful", level=PrettyPrintLevel.SUCCESS) - except: # pylint:disable=bare-except + except OSError as e: # pylint:disable=bare-except pretty_print( - "Creating a shortcut link for '%s' didn't work." % resource_alias, + "Creating a shortcut link for '%s' didn't work: %s" + % (resource_alias, repr(e)), title="The language resources were successfully downloaded, " "however linking failed.", - level=PrettyPrintLevel.WARNING) + level=PrettyPrintLevel.ERROR)