summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorits-not-a-bug-its-a-feature <david.cole@sohonet.com>2021-01-20 17:22:45 -0800
committerTim Burke <tburke@nvidia.com>2021-01-23 05:31:33 +0000
commitea0cab6e3e0e6db8a09b6beea06791d3455a32d1 (patch)
tree8ba9ec1109ad9b5203e9a65c637fec7b9f45f76e /bin
parent257041affe070c484adb1612c3c5c4eecc4130d7 (diff)
downloadswift-ea0cab6e3e0e6db8a09b6beea06791d3455a32d1.tar.gz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift-drive-audit2
1 files changed, 1 insertions, 1 deletions
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