BF: FilterSystemd.formatJournalEntry is a classmethod, not staticmethod

Reference to undefined `self` was raising error.
pull/652/head
Steven Hiscocks 2014-03-16 13:27:13 +00:00
parent 3990a19fc7
commit 5b14bc048f
1 changed files with 3 additions and 3 deletions

View File

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