Skip to content

Commit

Permalink
Improve failed linking error message after download of resources (#774)
Browse files Browse the repository at this point in the history
Improve linking failed message
  • Loading branch information
adrienball authored Mar 25, 2019
1 parent 045d57e commit 760c278
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions snips_nlu/cli/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 760c278

Please sign in to comment.