Skip to content
Snippets Groups Projects
Commit 8981546c authored by Peters, Wouter's avatar Peters, Wouter
Browse files

Merge branch 'master' into 'master'

Updated the cartesius platform file to Python3

See merge request !13
parents ef5de84c d3a490c9
Branches
No related tags found
No related merge requests found
...@@ -108,12 +108,12 @@ class CartesiusPlatform(Platform): ...@@ -108,12 +108,12 @@ class CartesiusPlatform(Platform):
template += """#$ -hold_jid depends \n""" template += """#$ -hold_jid depends \n"""
# First replace from passed dictionary # First replace from passed dictionary
for k, v in joboptions.items(): for k, v in list(joboptions.items()):
while k in template: while k in template:
template = template.replace(k, v) template = template.replace(k, v)
# Fill remaining values with std_options # Fill remaining values with std_options
for k, v in std_joboptions.items(): for k, v in list(std_joboptions.items()):
while k in template: while k in template:
template = template.replace(k, v) template = template.replace(k, v)
...@@ -132,9 +132,9 @@ class CartesiusPlatform(Platform): ...@@ -132,9 +132,9 @@ class CartesiusPlatform(Platform):
logging.info("A new task will be started (%s)" % cmd) logging.info("A new task will be started (%s)" % cmd)
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
logging.info(output) logging.info(output)
print 'output', output print('output', output)
jobid = output.split()[-1] jobid = output.split()[-1]
print 'jobid', jobid print('jobid', jobid)
else: else:
cmd = ["sbatch", jobfile] cmd = ["sbatch", jobfile]
logging.info("A new job will be submitted (%s)" % cmd) logging.info("A new job will be submitted (%s)" % cmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment