From 07076b9f9a6cd67806d1e6df2a02c0a20ff3aa59 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Mon, 20 Sep 2021 13:40:58 -0400 Subject: [PATCH] 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 --- roles/web-data-analysis/files/mirrorlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/web-data-analysis/files/mirrorlist.py b/roles/web-data-analysis/files/mirrorlist.py index cf1a5815f0..293c4382fa 100644 --- a/roles/web-data-analysis/files/mirrorlist.py +++ b/roles/web-data-analysis/files/mirrorlist.py @@ -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