Fix traceback in old mirror counting program.

When a corrupt date is found in the log file, I have the program
default of 1970-01-01 but because there is a lookup used it needed to
be 1970-Jan-01 which would then get replaced by 1970-01-01.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
This commit is contained in:
Stephen Smoogen 2021-09-20 13:40:58 -04:00 committed by smooge
parent b00d1d2f85
commit 07076b9f9a

View file

@ -404,7 +404,7 @@ def breakoutdate(givendate):
[day, month, year] = givendate.split(":")[0].split('/')
except:
# string out of index because date corrupted?
[day, month, year ] = ['01', '01', '1970'] # epoch
[day, month, year ] = ['01', 'Jan', '1970'] # epoch
ret_str = "%s-%s-%s" % (year, Apache_Months[month], day)
return ret_str