File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -565,10 +565,13 @@ def collect_backups(self, location):
565565 elif self .include_list and not any (fnmatch .fnmatch (entry , p ) for p in self .include_list ):
566566 logger .verbose ("Excluded %s (it didn't match the include list)." , entry )
567567 else :
568- backups .append (Backup (
569- pathname = os .path .join (location .directory , entry ),
570- timestamp = datetime .datetime (* (int (group , 10 ) for group in match .groups ('0' ))),
571- ))
568+ try :
569+ backups .append (Backup (
570+ pathname = os .path .join (location .directory , entry ),
571+ timestamp = datetime .datetime (* (int (group , 10 ) for group in match .groups ('0' ))),
572+ ))
573+ except ValueError as e :
574+ logger .notice ("Ignoring %s due to invalid date (%s)." , entry , e )
572575 else :
573576 logger .debug ("Failed to match time stamp in filename: %s" , entry )
574577 if backups :
You can’t perform that action at this time.
0 commit comments