mirror of https://github.com/fail2ban/fail2ban
BF: FilterSystemd.formatJournalEntry is a classmethod, not staticmethod
Reference to undefined `self` was raising error.pull/652/head
parent
3990a19fc7
commit
5b14bc048f
|
@ -160,8 +160,8 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
|
|||
# @param entry systemd journal entry dict
|
||||
# @return format log line
|
||||
|
||||
@staticmethod
|
||||
def formatJournalEntry(logentry):
|
||||
@classmethod
|
||||
def formatJournalEntry(cls, logentry):
|
||||
logelements = [""]
|
||||
if logentry.get('_HOSTNAME'):
|
||||
logelements.append(logentry['_HOSTNAME'])
|
||||
|
@ -195,7 +195,7 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
|
|||
# Python 3, one or more elements bytes
|
||||
logSys.warning("Error decoding log elements from journal: %s" %
|
||||
repr(logelements))
|
||||
logline = self._joinStrAndBytes(logelements)
|
||||
logline = cls._joinStrAndBytes(logelements)
|
||||
|
||||
date = logentry.get('_SOURCE_REALTIME_TIMESTAMP',
|
||||
logentry.get('__REALTIME_TIMESTAMP'))
|
||||
|
|
Loading…
Reference in New Issue