Commit 8ad0693b authored by Roland Haas's avatar Roland Haas
Browse files

remove interactive option from methods and use member var instead

pointed out by Steven Foga
parent 8fe7f973
......@@ -47,7 +47,7 @@ class GlobusTransferHelper:
tokens = self.load_tokens_from_file(TOKEN_FILE)
# if we still need to get tokens, start the Native App authentication process
if interactive:
if self.interactive:
tokens = self.do_native_app_authentication(self.CLIENT_ID, REDIRECT_URI, SCOPES)
......@@ -131,17 +131,16 @@ class GlobusTransferHelper:
"""Return the globus TransferClient object used"""
return self.tclient
def endpoint_autoactivate(self, endpoint, interactive=True):
def endpoint_autoactivate(self, endpoint):
"""present URL to activate an endpoint if needed
endpoint - globus endpoint UUID on which files should be deleted
interactive - show dialog if needed (default: True)
True if activation succeeded
r = self.tclient.endpoint_autoactivate(endpoint, if_expires_in=24*3600)
while (r["code"] == "AutoActivationFailed"):
print("Endpoint requires manual activation, please open "
"the following URL in a browser to activate the "
......@@ -162,7 +161,7 @@ class GlobusTransferHelper:
while not self.tclient.task_wait(result["task_id"], timeout=self.TIMEOUT):
if interactive:
if self.interactive:
print("Waiting on {0} to complete".format(result["task_id"]))
return self.tclient.get_task(result["task_id"])
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