Skip to content

Commit

Permalink
Allow .dev as tag_stream for fcos version
Browse files Browse the repository at this point in the history
For testing-devel, we have older builds with .dev(non-int) as
tag_stream. Lets allow that to pass as a valid FCOS version
through parse_fcos_version_to_timestamp_and_stream
  • Loading branch information
gursewak1997 committed Aug 2, 2024
1 parent bfa8ef6 commit 7ebc623
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cmd-container-prune
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def main():
except Exception:
print(f"WARNING: Ignoring unexpected tag: {tag}")
continue
if stream_id != tag_stream:
if stream_id != int(tag_stream):
if args.v:
print(f"Skipping tag {tag} not in {args.stream} stream")
continue
Expand Down
2 changes: 1 addition & 1 deletion src/cosalib/cmdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def parse_fcos_version_to_timestamp_and_stream(version):
timestamp = datetime.datetime.strptime(m.group(2), '%Y%m%d')
except ValueError:
raise Exception(f"FCOS build {version} has incorrect date format. It should be in (%Y%m%d)")
return (timestamp, int(m.group(3)))
return (timestamp, m.group(3))


def convert_duration_to_days(duration_arg):
Expand Down

0 comments on commit 7ebc623

Please sign in to comment.