Skip to content

Commit

Permalink
Give an early error about inaccessible security context files, instea…
Browse files Browse the repository at this point in the history
…d of silently ignore it.
  • Loading branch information
jmfernandez committed Aug 29, 2023
1 parent fe7e601 commit 2063728
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions wfexs_backend/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,10 +1034,15 @@ def FromFiles(
)

# Last, try loading the security contexts credentials file
if securityContextsConfigFilename and os.path.exists(
securityContextsConfigFilename
):
creds_config = cls.ReadSecurityContextFile(securityContextsConfigFilename)
if securityContextsConfigFilename:
if os.path.exists(securityContextsConfigFilename):
creds_config = cls.ReadSecurityContextFile(
securityContextsConfigFilename
)
else:
raise WFException(
f"Security context file {securityContextsConfigFilename} is not reachable"
)
else:
creds_config = {}

Expand Down

0 comments on commit 2063728

Please sign in to comment.