Skip to content

Commit 7ebc623

Browse files
committed
Allow .dev as tag_stream for fcos version
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
1 parent bfa8ef6 commit 7ebc623

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cmd-container-prune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def main():
102102
except Exception:
103103
print(f"WARNING: Ignoring unexpected tag: {tag}")
104104
continue
105-
if stream_id != tag_stream:
105+
if stream_id != int(tag_stream):
106106
if args.v:
107107
print(f"Skipping tag {tag} not in {args.stream} stream")
108108
continue

src/cosalib/cmdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def parse_fcos_version_to_timestamp_and_stream(version):
351351
timestamp = datetime.datetime.strptime(m.group(2), '%Y%m%d')
352352
except ValueError:
353353
raise Exception(f"FCOS build {version} has incorrect date format. It should be in (%Y%m%d)")
354-
return (timestamp, int(m.group(3)))
354+
return (timestamp, m.group(3))
355355

356356

357357
def convert_duration_to_days(duration_arg):

0 commit comments

Comments
 (0)