Commit bed8de00 authored by Roland Haas's avatar Roland Haas
Browse files

update transfer_response after waiting for it

parent 0883984c
......@@ -143,6 +143,7 @@ class GlobusTransferHelper:
while not self.tclient.task_wait(result["task_id"], timeout=self.TIMEOUT):
if interactive:
print("Waiting on {0} to complete".format(result["task_id"]))
return self.tclient.get_task(result["task_id"])
def delete(self, endpoint, paths, recursive = False, synchronous = True,
mylabel = None):
......@@ -167,7 +168,7 @@ class GlobusTransferHelper:
ddata.add_item(path)
delete_result = self.tclient.submit_delete(ddata)
if synchronous:
self.task_wait(delete_result)
delete_result = self.task_wait(delete_result)
return delete_result
def transfer(self, srcpoint, destpoint, transfers,
......@@ -197,7 +198,7 @@ class GlobusTransferHelper:
tdata.add_item(transfer[0], transfer[1], recursive=recursive)
transfer_response = self.tclient.submit_transfer(tdata)
if synchronous:
self.task_wait(transfer_response)
transfer_response = self.task_wait(transfer_response)
return transfer_response
def ls(self, endpoint, path, depth=1):
......@@ -274,7 +275,7 @@ class GlobusTransferHelper:
"""
transfer_response = self.tclient.operation_mkdir(endpoint, path=path)
if synchronous:
self.task_wait(transfer_response)
transfer_response = self.task_wait(transfer_response)
return transfer_response
def rename(self, endpoint, oldpath, newpath, synchronous = False):
......@@ -291,7 +292,7 @@ class GlobusTransferHelper:
transfer_response = \
self.tclient.operation_rename(endpoint, oldpath, newpath)
if synchronous:
self.task_wait(transfer_response)
transfer_response = self.task_wait(transfer_response)
return transfer_response
if __name__ == '__main__':
......
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