diff --git a/wfexs_backend/workflow.py b/wfexs_backend/workflow.py index 25d06f28..ad9be659 100644 --- a/wfexs_backend/workflow.py +++ b/wfexs_backend/workflow.py @@ -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 = {}