File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,11 @@ def clone_channels():
194194
195195 tagline = node ('p' ).text ()
196196
197- tagline_res = re .match (r'^Released on (.+) from' , tagline )
197+ # Examples:
198+ #
199+ # Released on yyyy-mm-dd hh:mm UTC from Git commit ...
200+ # Released on yyyy-mm-dd hh:mm from ...
201+ tagline_res = re .match (r'^Released on (.+?) (?:UTC )?from' , tagline )
198202
199203 if tagline_res is None :
200204 logging .warning (f' - Invalid tagline: { tagline } ' )
@@ -385,6 +389,9 @@ def garbage_collect():
385389
386390 channel = release .name .split ('@' )[0 ]
387391 date_str = (release / '.released-time' ).read_text ()
392+ date_match = re .match (r'\d+-\d+-\d+ \d+:\d+' , date_str )
393+ assert date_match is not None , f'Release { release !r} has invalid time { date_str !r} '
394+ date_str = date_match [0 ]
388395 released_date = datetime .strptime (date_str , '%Y-%m-%d %H:%M:%S' )
389396
390397 if released_date >= time_threshold :
You can’t perform that action at this time.
0 commit comments