[systemd-commits] 2 commits - src/python-systemd
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Sat Apr 5 10:31:48 PDT 2014
src/python-systemd/_reader.c | 1 -
src/python-systemd/journal.py | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit b65f24238b0627143916a9c7f8315483a9666676
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sat Apr 5 13:29:50 2014 -0400
systemd-python: fix failing assert
A parameter which was always null before, now get's set to
the module.
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 059b904..9a19a10 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -902,7 +902,6 @@ static PyObject* get_catalog(PyObject *self, PyObject *args) {
sd_id128_t id;
_cleanup_free_ char *msg = NULL;
- assert(!self);
assert(args);
if (!PyArg_ParseTuple(args, "z:get_catalog", &id_))
commit b532cf3722e04adb0bd075666eb9989a9390d0a2
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sat Apr 5 13:23:25 2014 -0400
systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3.
https://bugs.freedesktop.org/show_bug.cgi?id=77086
diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py
index 9c7e004..dd1f229 100644
--- a/src/python-systemd/journal.py
+++ b/src/python-systemd/journal.py
@@ -293,7 +293,7 @@ class Reader(_Reader):
monotonic = monotonic.totalseconds()
monotonic = int(monotonic * 1000000)
if isinstance(bootid, _uuid.UUID):
- bootid = bootid.get_hex()
+ bootid = bootid.hex
return super(Reader, self).seek_monotonic(monotonic, bootid)
def log_level(self, level):
@@ -314,7 +314,7 @@ class Reader(_Reader):
Equivalent to add_match(MESSAGE_ID=`messageid`).
"""
if isinstance(messageid, _uuid.UUID):
- messageid = messageid.get_hex()
+ messageid = messageid.hex
self.add_match(MESSAGE_ID=messageid)
def this_boot(self, bootid=None):
@@ -346,7 +346,7 @@ class Reader(_Reader):
def get_catalog(mid):
if isinstance(mid, _uuid.UUID):
- mid = mid.get_hex()
+ mid = mid.hex
return _get_catalog(mid)
def _make_line(field, value):
More information about the systemd-commits
mailing list