From ea0cab6e3e0e6db8a09b6beea06791d3455a32d1 Mon Sep 17 00:00:00 2001 From: its-not-a-bug-its-a-feature Date: Wed, 20 Jan 2021 17:22:45 -0800 Subject: Adjust initial month value from int to str swift-drive-audit checks to see if a new year has recently ticked over by checking to see if the current month is January and the logs we are checking are in December. The logs use abbreviated month names, so we need to extract that from "now" to make valid comparisons. Closes-Bug: 1912508 Change-Id: Iabb53f5e4081d580d016bbf75d86e1d75e1f20bb --- bin/swift-drive-audit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/swift-drive-audit b/bin/swift-drive-audit index c9c456d3a..b77167042 100755 --- a/bin/swift-drive-audit +++ b/bin/swift-drive-audit @@ -84,7 +84,7 @@ def get_errors(error_re, log_file_pattern, minutes, logger, # track of the year and month in case the year recently # ticked over year = now_time.year - prev_entry_month = now_time.month + prev_entry_month = now_time.strftime('%b') errors = {} reached_old_logs = False -- cgit v1.2.1