From 98bb4d7dc8885f38ff2c88e29de10985ec7d3fcb Mon Sep 17 00:00:00 2001 From: aguerre Date: Wed, 28 Aug 2013 16:17:34 +0000 Subject: [PATCH] Restore passing single study file as command line argument --- bin/launchConfigureParser.py | 5 ++--- bin/salomeLauncherUtils.py | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index b1d8aed20..d89e2d1df 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -1013,9 +1013,8 @@ def get_env(theAdditionalOptions=[], appname=salomeappname, cfgname=salomecfgnam args["ns_port_log_file"] = cmd_opts.ns_port_log_file # Study files - if len(cmd_args) > 0 and not args["study_hdf"]: - arg = cmd_args[0] # :NOTE: only look at first element - if arg[-4:] == ".hdf": + for arg in cmd_args: + if arg[-4:] == ".hdf" and not args["study_hdf"]: args["study_hdf"] = arg # Python scripts diff --git a/bin/salomeLauncherUtils.py b/bin/salomeLauncherUtils.py index 6e23076dd..f64e83fcc 100644 --- a/bin/salomeLauncherUtils.py +++ b/bin/salomeLauncherUtils.py @@ -82,12 +82,14 @@ def getScriptsAndArgs(args=[]): if elt[-3:] == ".py": currentScript = os.path.abspath(elt) else: - currentScript = os.path.abspath(elt+".py") - if callPython: + currentScript = None + if elt[-4:] != ".hdf": + currentScript = os.path.abspath(elt+".py") + if currentScript and callPython: currentKey = "python "+currentScript scriptArgs.append({currentKey:[]}) callPython = False - else: + elif currentScript: if not os.access(currentScript, os.X_OK): currentKey = "python "+currentScript scriptArgs.append({currentKey:[]}) -- 2.39.2