Skip to content

Commit dff528f

Browse files
authored
Merge pull request #652 from paigerube14/main
Adding one more if statement
2 parents 60e9a00 + 55ad5a7 commit dff528f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

prow/generate_jobs_in_gsheet/get_periodic_jobs.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ def get_cloud_type(yaml_file):
127127
return "rosa"
128128
elif "aro" in yaml_file['steps']['workflow']:
129129
return "aro"
130-
if "aws" in yaml_file['steps']['cluster_profile']:
131-
return "aws"
132-
elif "gcp" in yaml_file['steps']['cluster_profile']:
133-
return "gcp"
134-
elif "azure" in yaml_file['steps']['cluster_profile']:
135-
return "azure"
136-
else:
137-
return "Unset"
130+
if "cluster_profile" in yaml_file['steps'].keys():
131+
if "aws" in yaml_file['steps']['cluster_profile']:
132+
return "aws"
133+
elif "gcp" in yaml_file['steps']['cluster_profile']:
134+
return "gcp"
135+
elif "azure" in yaml_file['steps']['cluster_profile']:
136+
return "azure"
137+
return "Unset"
138138

139139
def verify_channel(test):
140140
if "env" in test['steps'].keys():

0 commit comments

Comments
 (0)