Skip to content

Commit bfa8ef6

Browse files
committed
Minor fixes: Fix fcos version check and error return
We have few older builds for testing-devel which had .dev in their buildIDs. Fixed the version check to accept that. Also fixed the return statement in delete_gcp_image to return empty errors list instead on returning None as needed.
1 parent 6cf62cb commit bfa8ef6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cmd-cloud-prune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def delete_gcp_image(build, cloud_config, dry_run):
272272
gcp = build.images.get("gcp")
273273
if not gcp:
274274
print(f"No GCP image for {build.id} for {build.arch}")
275-
return
275+
return errors
276276
gcp_image = gcp.get("image")
277277
json_key = cloud_config.get("gcp", {}).get("json-key")
278278
project = cloud_config.get("gcp", {}).get("project")

src/cosalib/cmdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def parse_fcos_version_to_timestamp_and_stream(version):
344344
Parses an FCOS build ID and verifies the versioning is accurate. Then
345345
it verifies that the parsed timestamp has %Y%m%d format and returns that.
346346
'''
347-
m = re.match(r'^([0-9]{2})\.([0-9]{8})\.([0-9]+)\.([0-9]+)$', version)
347+
m = re.match(r'^([0-9]{2})\.([0-9]{8})\.([0-9]+|dev)\.([0-9]+)$', version)
348348
if m is None:
349349
raise Exception(f"Incorrect versioning for FCOS build {version}")
350350
try:

0 commit comments

Comments
 (0)