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
This commit is contained in:
its-not-a-bug-its-a-feature 2021-01-20 17:22:45 -08:00 committed by Tim Burke
parent 257041affe
commit ea0cab6e3e
1 changed files with 1 additions and 1 deletions

View File

@ -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