(20260311) Cosec scripts can now accept custom file names for the credentials, but they must be in the same 'creds' directory.
This commit is contained in:
+12
-2
@@ -367,6 +367,16 @@ if __name__ == "__main__":
|
||||
action = "store_true",
|
||||
default = False,
|
||||
)
|
||||
ap.add_argument(
|
||||
"--cosec-creds",
|
||||
help = "The credentials JSON from which you would like to connect to COSEC.",
|
||||
default = "cosec.json"
|
||||
)
|
||||
ap.add_argument(
|
||||
"--tcaoff-creds",
|
||||
help = "The credentials JSON from which you would like to connect to TheCAOffice.",
|
||||
default = "tcaoff.json"
|
||||
)
|
||||
args = ap.parse_args()
|
||||
|
||||
# Explicitly mention the expected file paths for other devs to maintain:
|
||||
@@ -375,8 +385,8 @@ if __name__ == "__main__":
|
||||
print("TCAOFF CREDS:", common.TCAOFF_CREDS_FILE)
|
||||
|
||||
# Read required credentials:
|
||||
cosec_creds = json.from_file(common.COSEC_CREDS_FILE)
|
||||
tcaoff_creds = json.from_file(common.TCAOFF_CREDS_FILE)
|
||||
cosec_creds = json.from_file(os.path.join(common.CREDS_DIR, args.cosec_creds))
|
||||
tcaoff_creds = json.from_file(os.path.join(common.CREDS_DIR, args.tcaoff_creds))
|
||||
|
||||
# Create the clients:
|
||||
tcaoff_client = AsyncTheCAOffice(
|
||||
|
||||
Reference in New Issue
Block a user