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)