X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fpython-systemd%2Fjournal.py;fp=src%2Fpython-systemd%2Fjournal.py;h=8fd1bb357c199bb32e488d17ffef08f204a65011;hp=9ef1ede229e8f9b695f252e97cbe726fe50d278a;hb=0a0c35d151570cca5ccd30befaa19c87b9c8c92d;hpb=28f30cf274398ab80c71ea0c2afec4b94f8ba76e diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py index 9ef1ede22..8fd1bb357 100644 --- a/src/python-systemd/journal.py +++ b/src/python-systemd/journal.py @@ -55,6 +55,9 @@ def _convert_realtime(t): def _convert_timestamp(s): return _datetime.datetime.fromtimestamp(int(s) / 1000000) +def _convert_trivial(x): + return x + if _sys.version_info >= (3,): def _convert_uuid(s): return _uuid.UUID(s.decode()) @@ -87,6 +90,7 @@ DEFAULT_CONVERTERS = { '__REALTIME_TIMESTAMP': _convert_realtime, '_SOURCE_MONOTONIC_TIMESTAMP': _convert_source_monotonic, '__MONOTONIC_TIMESTAMP': _convert_monotonic, + '__CURSOR': _convert_trivial, 'COREDUMP': bytes, 'COREDUMP_PID': int, 'COREDUMP_UID': int,