Skip to content

Commit 4af9ba8

Browse files
infispielJoshuaSBrown
authored andcommitted
Un-comment getEndpointIdFromFile method
1 parent f2a87bd commit 4af9ba8

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

scripts/globus/utils.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,20 @@ def getClientIdFromCredFile(cred_file_name, cred_type="setup"):
224224
print(f"Failed to get client ID from file '{cred_file_name}': credential type '{cred_type}' not found.")
225225
return None
226226

227-
# Doesn't appear to be referenced in any files. Commenting out
228-
# to test if it is safe to remove.
229-
230-
# def getEndpointIdFromFile(deployment_key_file_path):
231-
# # Check to see if the local secret is the same id and not just the same
232-
# # name
233-
# _, empty = validFile(deployment_key_file_path)
234-
# if empty is False:
235-
# with open(deployment_key_file_path, "r") as f:
236-
# loaded_data = json.load(f)
237-
# return loaded_data["client_id"]
238-
# return None
227+
228+
# Doesn't appear to be used.
229+
# Not removing until we have a chance to refactor the entire
230+
# globus configuration setup process.
231+
232+
def getEndpointIdFromFile(deployment_key_file_path):
233+
# Check to see if the local secret is the same id and not just the same
234+
# name
235+
_, empty = validFile(deployment_key_file_path)
236+
if empty is False:
237+
with open(deployment_key_file_path, "r") as f:
238+
loaded_data = json.load(f)
239+
return loaded_data["client_id"]
240+
return None
239241

240242

241243
def createNewCredential(auth_client, client_id, cred_name, cred_file, cred_type):

0 commit comments

Comments
 (0)