Adjust SYS_LOG_PATTERN to parse single digit day number
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 8 Nov 2022 08:57:02 +0000 (09:57 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 8 Nov 2022 08:57:02 +0000 (09:57 +0100)
commit802fdc29219e58b585ee5a6bebbfcec80e267b83
tree893319cbb60d9d119fb5792d8929e77aa84c1bab
parent71cd22f0c46c476241d9f1c9d716029e4e83a478
Adjust SYS_LOG_PATTERN to parse single digit day number

Noticed by this failing unit test:

FAIL: test_parse_messages (test_log_read.LogReadTester)
Try parsing first 100 lines of messages if running on linux
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pyi2ncommon/test/test_log_read.py", line 268, in test_parse_messages
    self.assertIsNotNone(data, f"Failed to parse {parser.last_unparsed_line}")
AssertionError: unexpectedly None : Failed to parse Nov  7 09:24:31 storm kernel: Linux version 6.0.5-200.fc36.x86_64 (mockbuild@bkernel02.iad2.fedoraproject.org) (gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-2), GNU ld version 2.37-36.fc36) #1 SMP PREEMPT_DYNAMIC Wed Oct 26 15:55:21 UTC 2022
src/log_read.py