Skip to content

Commit

Permalink
fix env var check
Browse files Browse the repository at this point in the history
  • Loading branch information
strangiato committed Jul 30, 2024
1 parent d24ee22 commit ced24c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipelines/11_iris_training_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def iris_pipeline(model_obc: str = "iris-model"):
print(f"Connecting to kfp: {kubeflow_endpoint}")

sa_token_path = "/run/secrets/kubernetes.io/serviceaccount/token" # noqa: S105
if os.environ["BEARER_TOKEN"]:
if "BEARER_TOKEN" in os.environ:
bearer_token = os.environ["BEARER_TOKEN"]
elif os.path.isfile(sa_token_path):
with open(sa_token_path) as f:
Expand Down

0 comments on commit ced24c1

Please sign in to comment.