Skip to content

Commit f1a8622

Browse files
Review changes: conditionals
1 parent 62519b2 commit f1a8622

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/codeflare_sdk/cluster/cluster.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -515,14 +515,14 @@ def from_k8_cluster_object(
515515
else:
516516
local_interactive = False
517517
if "codeflare.dev/oauth" in rc["metadata"]["annotations"]:
518-
if rc["metadata"]["annotations"]["codeflare.dev/oauth"] == "True":
519-
openshift_oauth = True
518+
openshift_oauth = (
519+
rc["metadata"]["annotations"]["codeflare.dev/oauth"] == "True"
520+
)
520521
else:
521522
for container in rc["spec"]["headGroupSpec"]["template"]["spec"][
522523
"containers"
523524
]:
524-
if "oauth-proxy" in container["name"]:
525-
openshift_oauth = True
525+
openshift_oauth = "oauth-proxy" in container["name"]
526526
machine_types = (
527527
rc["metadata"]["labels"]["orderedinstance"].split("_")
528528
if "orderedinstance" in rc["metadata"]["labels"]

0 commit comments

Comments
 (0)