[systemd-commits] src/python-systemd
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Wed May 15 21:46:57 PDT 2013
src/python-systemd/journal.py | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 0a0c35d151570cca5ccd30befaa19c87b9c8c92d
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Thu May 16 00:38:39 2013 -0400
systemd-python: do not attempt to convert str to bytes
Bug-spotted-by: Steven Hiscocks <steven-systemd at hiscocks.me.uk>
diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py
index 9ef1ede..8fd1bb3 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,
More information about the systemd-commits
mailing list