Commit 1fa45631 authored by Michael Salim's avatar Michael Salim

Local stage-in, stage-out handlers were broken. Fixed.

parent 6498a0b7
......@@ -47,7 +47,7 @@ def stage_out(job):
message = None
if job.output_url != '':
try:
transfer.stage_out( self.working_directory + '/', self.output_url + '/' )
transfer.stage_out(job.working_directory + '/', job.output_url + '/' )
job.state = STAGED_OUT.name
except Exception as e:
message = 'Exception received during stage_out: ' + str(e)
......
......@@ -103,17 +103,18 @@ class LocalHandler:
parts = urlparse.urlparse( source_url )
command = 'cp -p -r /%s%s* %s' % (parts.netloc,parts.path,destination_directory)
logger.debug('transfer.stage_in: command=' + command )
p = subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
p = subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,
shell=True)
stdout,stderr = p.communicate()
if p.returncode != 0:
raise Exception("Error in stage_in: %d output:\n" % (p.returncode,stdout))
def stage_out( self, source_directory, destination_url ):
parts = urlparse.urlparse( destination_url )
command = 'cp -r %s/* /%s/%s' % (source_directory,parts.netloc,parts.path)
logger.debug( 'transfer.stage_out: command=' + command )
p = subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
p = subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,
shell=True)
stdout,stderr = p.communicate()
if p.returncode != 0:
raise Exception("Error in stage_out: %d output:\n" % (p.returncode,stdout))
......
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