Commit a877cb50 authored by Christoph Arthofer's avatar Christoph Arthofer
Browse files

fslsub

parent 9a53aedb
...@@ -517,7 +517,7 @@ def submitJob(name, log_dir, queue, wait_for=[], script=None, command=None, copr ...@@ -517,7 +517,7 @@ def submitJob(name, log_dir, queue, wait_for=[], script=None, command=None, copr
if script is not None and os.path.exists(script): if script is not None and os.path.exists(script):
cmd += ' -t ' + script cmd += ' -t ' + script
elif command is not None : elif command is not None :
cmd += shlex.split(command) cmd += ' "' + command + '"'
# stream = os.popen(cmd) # stream = os.popen(cmd)
# job_id = stream.read() # job_id = stream.read()
...@@ -525,7 +525,7 @@ def submitJob(name, log_dir, queue, wait_for=[], script=None, command=None, copr ...@@ -525,7 +525,7 @@ def submitJob(name, log_dir, queue, wait_for=[], script=None, command=None, copr
print(cmd) print(cmd)
try: try:
result = subprocess.run(cmd, capture_output=True, text=True, check=True) result = subprocess.run(shlex.split(cmd), capture_output=True, text=True, check=True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print(str(e), file=sys.stderr) print(str(e), file=sys.stderr)
return None return None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment