aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2025-01-04 01:37:43 +0000
committerArun Isaac2025-01-04 01:39:23 +0000
commit88686ab7f52955bb50f603040e8dd29bac2b459b (patch)
tree0692ebe16ac4b9a68e9a4ba93a2a0c595b008e62
parent1718ff1bf4611e05d2fb952240369e27fe1504bd (diff)
downloadglobus-weblinks-88686ab7f52955bb50f603040e8dd29bac2b459b.tar.gz
globus-weblinks-88686ab7f52955bb50f603040e8dd29bac2b459b.tar.lz
globus-weblinks-88686ab7f52955bb50f603040e8dd29bac2b459b.zip
Print to stdout, not stderr.
Since we are no longer printing out web links to stdout, we no longer care to separate out other printing to stderr.
-rwxr-xr-xglobus-weblinks8
1 files changed, 2 insertions, 6 deletions
diff --git a/globus-weblinks b/globus-weblinks
index 92f598d..8a7d718 100755
--- a/globus-weblinks
+++ b/globus-weblinks
@@ -4,7 +4,6 @@ import argparse
from pathlib import Path, PurePath
import json
import requests
-import sys
import globus_sdk
from urllib.parse import urlparse
@@ -18,12 +17,9 @@ def get_transfer_token():
client.oauth2_start_flow()
authorize_url = client.oauth2_get_authorize_url()
- print(f"Please go to this URL and login:\n\n{authorize_url}\n",
- file=sys.stderr)
+ print(f"Please go to this URL and login:\n\n{authorize_url}\n")
- print("Please enter the code you get after login here: ",
- end="", file=sys.stderr)
- auth_code = input().strip()
+ auth_code = input("Please enter the code you get after login here: ").strip()
return (client.oauth2_exchange_code_for_tokens(auth_code)
.by_resource_server["transfer.api.globus.org"]["access_token"])