From 1b4e4cdc86045fc5639aed588727b1226d0cb0ef Mon Sep 17 00:00:00 2001 From: tmaeno Date: Sun, 25 Feb 2024 10:31:10 +0100 Subject: [PATCH] improved pchain to set --useAthenaPackages automatically --- ChangeLog.txt | 1 + pandaclient/PchainScript.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index b6c01ba..419a749 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,7 @@ 1.5.73 * fixed module of JobSpec and FileSpec * to allow main in --useAthenaTag + * improved pchain to set --useAthenaPackages automatically 1.5.72 * fixed for OIDC diff --git a/pandaclient/PchainScript.py b/pandaclient/PchainScript.py index 756f343..34b2325 100644 --- a/pandaclient/PchainScript.py +++ b/pandaclient/PchainScript.py @@ -203,6 +203,14 @@ def _onExit(dir, del_command): except Exception: pass + # check if the workflow uses athena packages + if not options.useAthenaPackages: + with open(workflow_file, "r") as f: + for line in f.readlines(): + if re.search(r"^\s*[^#]\s*opt_useAthenaPackages", line): + options.useAthenaPackages = True + break + matchURL = re.search("(http.*://[^/]+)/", Client.baseURLCSRVSSL) sourceURL = matchURL.group(1)