Commit 13f89b74 authored by Lukas Weber's avatar Lukas Weber
Browse files

speed up taskmaker a little

parent d819dcba
......@@ -19,7 +19,7 @@ class JobFile:
raise JobFileGenError('Generation script "{}" had a non-zero return code. Treating as error.'.format(filename))
parsed_job = yaml.safe_load(self.raw_jobfile)
parsed_job = yaml.load(self.raw_jobfile, Loader=yaml.CSafeLoader)
except Exception as e:
raise JobFileGenError('Could not parse job generation script output: {}'.format(e))
......@@ -8,7 +8,7 @@ def _expand_path(path):
def JobConfig(filename):
with open(_expand_path(filename), 'r') as f:
return yaml.safe_load(f)
return yaml.load(f, Loader=yaml.CSafeLoader)
class TaskMaker:
def __init__(self, name, jobconfig):
......@@ -41,4 +41,4 @@ class TaskMaker:
task_dict[k] = v
jobfile_dict['tasks'][task_name] = task_dict
print(yaml.dump(jobfile_dict, Dumper=yaml.CSafeDumper))
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