Commit a2f0c1df authored by Sebastien Robin's avatar Sebastien Robin

minor small fixes (undefined parameters and empty stderr file)

parent b7d7de9c
......@@ -69,7 +69,9 @@ class SlapOSControler(object):
stderr.close()
return status_dict
def runComputerPartition(self, config, process_group_pid_set=None):
def runComputerPartition(self, config, environment,
process_group_pid_set=None,
stdout=None, stderr=None):
print "SlapOSControler.runSoftwareRelease"
slap = slapos.slap.slap()
slap.registerOpenOrder().request(self.software_profile,
......@@ -81,10 +83,12 @@ class SlapOSControler(object):
close_fds=True, preexec_fn=os.setsid)
process_group_pid_set.add(slapgrid.pid)
slapgrid.wait()
stdout.seek(0)
stderr.seek(0)
process_group_pid_set.remove(slapgrid.pid)
status_dict = {'status_code':slapgrid.returncode,
'stdout':stdout.read(),
'stderr':stderr.read()}
stdout.close()
stderr.close()
return status_dict
\ No newline at end of file
return status_dict
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