@@ -138,7 +138,7 @@ def get_microshift_repo(minor):
138
138
This function searches for a repository that provides the microshift package
139
139
for the given minor version. It checks the 'rhocp' stream, then release
140
140
candidate (RC), and finally engineering candidate (EC) repositories—in that
141
- order. If none are available, it returns None .
141
+ order. If none are available, it returns empty string .
142
142
143
143
Args:
144
144
minor (int): The minor version, e.g., 19 for 4.19.
@@ -162,7 +162,7 @@ def get_microshift_repo(minor):
162
162
return ec
163
163
164
164
logging .info (f"No repository found for 4.{ minor } " )
165
- return None
165
+ return ""
166
166
167
167
168
168
def get_release_version_string (repo , var_name ):
@@ -206,20 +206,20 @@ def get_release_version_string(repo, var_name):
206
206
# branches, or the OpenShift mirror if only a RC or EC is available. It can
207
207
# be empty, if no candidate for the current minor has been built yet.
208
208
logging .info ("Getting CURRENT_RELEASE_REPO" )
209
- current_release_repo = get_microshift_repo (minor_version ) or ""
209
+ current_release_repo = get_microshift_repo (minor_version )
210
210
current_release_version = get_release_version_string (current_release_repo , "CURRENT_RELEASE_REPO" )
211
211
212
212
# The previous release repository value should either point to the OpenShift
213
213
# mirror URL or the 'rhocp' repository name.
214
214
logging .info ("Getting PREVIOUS_RELEASE_REPO" )
215
- previous_release_repo = get_microshift_repo (previous_minor_version ) or ""
215
+ previous_release_repo = get_microshift_repo (previous_minor_version )
216
216
previous_release_version = get_release_version_string (previous_release_repo , "PREVIOUS_RELEASE_REPO" )
217
217
218
218
# The y-2 release repository value should either point to the OpenShift
219
219
# mirror URL or the 'rhocp' repository name. It should always come from
220
220
# the 'rhocp' stream.
221
221
logging .info ("Getting YMINUS2_RELEASE_REPO" )
222
- yminus2_release_repo = get_microshift_repo (yminus2_minor_version ) or ""
222
+ yminus2_release_repo = get_microshift_repo (yminus2_minor_version )
223
223
yminus2_release_version = get_release_version_string (yminus2_release_repo , "YMINUS2_RELEASE_REPO" )
224
224
225
225
# The 'rhocp_minor_y' variable should be the minor version number, if the
@@ -249,7 +249,7 @@ def get_release_version_string(repo, var_name):
249
249
set -euo pipefail
250
250
251
251
# Following file is auto-generated using generate_common_versions.py.
252
- # It should not be edited manually.manually
252
+ # It should not be edited manually.
253
253
254
254
if [[ "${{BASH_SOURCE[0]}}" == "${{0}}" ]]; then
255
255
echo "This script must be sourced, not executed."
0 commit comments