Skip to content

Commit 9f5a5e8

Browse files
committed
Add logger statements about globus cfg
1 parent 77c5edd commit 9f5a5e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

zstash/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ def set_hpss_parameters(self, hpss_path: str, null_hpss_allowed=False):
9292
if url.scheme == "globus":
9393
self.hpss_type = HPSSType.GLOBUS
9494
self.globus_info = GlobusInfo(hpss_path)
95+
globus_cfg: str = os.path.expanduser("~/.globus-native-apps.cfg")
96+
logger.info(f"Checking if {globus_cfg} exists")
97+
if os.path.exists(globus_cfg):
98+
logger.info(
99+
f"{globus_cfg} exists. If this file does not have the proper settings, it may cause a TransferAPIError (e.g., 'Token is not active', 'No credentials supplied')"
100+
)
101+
else:
102+
logger.info(
103+
f"{globus_cfg} does not exist. zstash will need to prompt for authentications twice, and then you will need to re-run."
104+
)
95105
else:
96106
self.hpss_type = HPSSType.SAME_MACHINE_HPSS
97107
elif null_hpss_allowed:

0 commit comments

Comments
 (0)