From efc3ea39c8d9a06ecb3dc86831f3a172a22d0030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 14 Mar 2014 15:33:31 +0100 Subject: [PATCH] exception raised if given script is not found --- bin/salomeContextUtils.py.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/salomeContextUtils.py.in b/bin/salomeContextUtils.py.in index 41e2c1138..6bd96b90d 100644 --- a/bin/salomeContextUtils.py.in +++ b/bin/salomeContextUtils.py.in @@ -122,7 +122,9 @@ def getScriptsAndArgs(args=[], searchPathList=None): if not os.path.isfile(elt) and not os.path.isfile(elt+".py"): eltInSearchPath = __getScriptPath(elt, searchPathList) if eltInSearchPath is None or (not os.path.isfile(eltInSearchPath) and not os.path.isfile(eltInSearchPath+".py")): - raise SalomeContextException("Script not found: %s"%elt) + if elt[-3:] == ".py": + raise SalomeContextException("Script not found: %s"%elt) + continue elt = eltInSearchPath if elt[-4:] != ".hdf": -- 2.39.2