From d023b3ad7bc60861e19dd47da359e3fcd6b2d6ea Mon Sep 17 00:00:00 2001 From: Sondre Sortland Date: Mon, 2 Mar 2020 11:18:55 +0100 Subject: [PATCH] Improve symlink error message --- python/res/fm/shell/shell.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/res/fm/shell/shell.py b/python/res/fm/shell/shell.py index 3d9a12340b..6da66d1bfc 100644 --- a/python/res/fm/shell/shell.py +++ b/python/res/fm/shell/shell.py @@ -49,7 +49,11 @@ def symlink(target , link_name): target_check = os.path.join( link_path , target ) if not os.path.exists( target_check ): - raise IOError("The target:%s does not exist" % target) + raise IOError( + "{} (target) and {} (link_name) requested, which implies that {} must exist, but it does not.".format( + target, link_name, target_check + ) + ) if os.path.islink( link_name ):