Skip to content

Commit 0bc601a

Browse files
committed
nix-channels: Tolerate new release taglines, take 2
Fix typo, add back seconds component to the expected release time format.
1 parent be5f4cd commit 0bc601a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nix-channels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ def clone_channels():
196196

197197
# Examples:
198198
#
199-
# Released on yyyy-mm-dd hh:mm UTC from Git commit ...
200-
# Released on yyyy-mm-dd hh:mm from ...
199+
# Released on yyyy-mm-dd hh:mm:ss UTC from Git commit ...
200+
# Released on yyyy-mm-dd hh:mm:ss from ...
201201
tagline_res = re.match(r'^Released on (.+?) (?:UTC )?from', tagline)
202202

203203
if tagline_res is None:
@@ -389,7 +389,7 @@ def garbage_collect():
389389

390390
channel = release.name.split('@')[0]
391391
date_str = (release / '.released-time').read_text()
392-
date_match = re.match(r'\d+-\d+-\d+ \d+:\d+', date_str)
392+
date_match = re.match(r'\d+-\d+-\d+ \d+:\d+:\d+', date_str)
393393
assert date_match is not None, f'Release {release!r} has invalid time {date_str!r}'
394394
date_str = date_match[0]
395395
released_date = datetime.strptime(date_str, '%Y-%m-%d %H:%M:%S')

0 commit comments

Comments
 (0)