Skip to content
Snippets Groups Projects
Commit 68743c93 authored by Frank Fischer's avatar Frank Fischer
Browse files

Better Shell handling/caller

parent efffd5de
Branches
No related tags found
No related merge requests found
......@@ -455,8 +455,10 @@ class JDLCreator(object):
command = 'condor_submit %s' % self.__JDLFilename.split('/')[-1]
print(command)
if subprocess.call(command.split(), shell=False):
raise RuntimeError('submit failed! Check your configuration')
try:
subprocess.check_call(command.split())
except subprocess.CalledProcessError as err:
raise RuntimeError('Submit failed (RC %d)! %s' % (err.returncode, err.output))
# jump back
if len(main_path) > 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment