Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Oct 6, 2023
1 parent 22dcd47 commit 748e8ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ def run_cmd(cmd):
# `cmd` must be a list
if isinstance(cmd, str):
cmd = cmd.split()
print(f"base.py os.listdir={os.listdir()}")
print("base.py run_cmd A")
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("base.py run_cmd B")
# TODO: user input prompts don't make it through here. It just hangs.
# Is it possible to check if we already have consents granted and then not need to prompt?
# Or, we could make a flag/command line option to prompt for consents or not.
output, err = p.communicate()
print("base.py run_cmd C")

# When running in Python 3, the output of subprocess.Popen.communicate()
# is a bytes object. We need to convert it to a string.
Expand Down Expand Up @@ -283,9 +282,7 @@ def create(
self.hpss_path,
self.test_dir,
)
print("base.py create A")
output, err = run_cmd(cmd)
print("base.py create B")
if use_hpss:
expected_present = ["Transferring file to HPSS"]
else:
Expand Down
1 change: 0 additions & 1 deletion zstash/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
def create():
cache: str
exclude: str
logger.warning("create.py create")
cache, args = setup_create()

# Check config fields
Expand Down
8 changes: 3 additions & 5 deletions zstash/globus.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def globus_flow(ep=""):

get_input = getattr(__builtins__, "raw_input", input)
auth_code = get_input("Please enter the code you get after login here: ")
raise Exception("CCC")
token_response = CLIENT.oauth2_exchange_code_for_tokens(auth_code)
raise Exception("DDD")
print(token_response)


Expand All @@ -70,7 +72,6 @@ def globus_activate(hpss: str):
global local_endpoint
global remote_endpoint

print("globus.py globus_activate")
url = urlparse(hpss)
if url.scheme != "globus":
return
Expand Down Expand Up @@ -117,10 +118,7 @@ def globus_activate(hpss: str):
if remote_endpoint.upper() in hpss_endpoint_map.keys():
remote_endpoint = hpss_endpoint_map.get(remote_endpoint.upper())

print(f"local_endpoint={local_endpoint}")
print(f"remote_endpoint={remote_endpoint}")
# globus_flow(local_endpoint)
# globus_flow(remote_endpoint)
globus_flow(remote_endpoint)

native_client = NativeClient(
client_id="6c1629cf-446c-49e7-af95-323c6412397f",
Expand Down

0 comments on commit 748e8ee

Please sign in to comment.