🐛 fetchmail-errors: fix for newer python
This commit is contained in:
parent
4ae427ef45
commit
9dfb528276
1 changed files with 1 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import datetime
|
||||||
import systemd.journal as journal
|
import systemd.journal as journal
|
||||||
|
|
||||||
|
|
||||||
yesterday = datetime.datetime.today() - datetime.timedelta(1)
|
yesterday = datetime.datetime.now(tz=datetime.timezone.utc) - datetime.timedelta(1)
|
||||||
SINCE = yesterday
|
SINCE = yesterday
|
||||||
MINCOUNT = 20
|
MINCOUNT = 20
|
||||||
|
|
||||||
|
|
@ -14,7 +14,6 @@ j = journal.Reader()
|
||||||
j.log_level(journal.LOG_ERR) # or more severe
|
j.log_level(journal.LOG_ERR) # or more severe
|
||||||
j.add_match(_COMM="fetchmail")
|
j.add_match(_COMM="fetchmail")
|
||||||
|
|
||||||
|
|
||||||
entries = [entry for entry in j
|
entries = [entry for entry in j
|
||||||
# j.seek_realtime() does not work as expected, so filtering here:
|
# j.seek_realtime() does not work as expected, so filtering here:
|
||||||
if entry['_SOURCE_REALTIME_TIMESTAMP'] >= SINCE]
|
if entry['_SOURCE_REALTIME_TIMESTAMP'] >= SINCE]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue