Commit fc7a7e61 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

remnants of bug 777

parent 3e6d1058
......@@ -378,12 +378,13 @@ class Pipeline:
seg: string, segment name
"""
for k,v in dict({self.repository.get_code_file(seg):self._code,self.repository.get_args_file(seg):self._args }).items():
file = k
fid = open(file, "r")
code = fid.read()
fid.close()
v[seg] = code
if path.exists(k):
fid = open(k, "r")
code = fid.read()
fid.close()
v[seg] = code
else:
v[seg] = ""
def get_seg_code(self, seg):
""" Return segment code as a string.
......
......@@ -275,7 +275,7 @@ class Scheduler():
r = self.pipe.repository
p = self.pipe
for k,v in dict({r.get_code_file(seg):p.get_seg_code(seg),r.get_args_file(seg):p.get_seg_args(seg)}).items():
if k and path.exists(k):
if v:
dest = d+'/'+os.path.basename(k)
fid = open(dest, "w")
fid.write(v)
......
Markdown is supported
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