summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-18 21:59:43 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-21 15:32:58 -0400
commitee9ab0bd6585787655b8add639b5bf7f9a322082 (patch)
treeca0a15b73af7a64049a4b01b4ec9cbad7dbd5c2e
parentdadcd3d723c7781ee9a3ab54341030cad10904bd (diff)
downloadpython-systemd-ee9ab0bd6585787655b8add639b5bf7f9a322082.tar.gz
journal: make sd_journal_enumerate return text strings
Those are field names and they should always be ASCII, and converting them to str automatically makes the answer more useful.
-rw-r--r--systemd/_reader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/systemd/_reader.c b/systemd/_reader.c
index ff9ddc4..71ae428 100644
--- a/systemd/_reader.c
+++ b/systemd/_reader.c
@@ -965,7 +965,7 @@ static PyObject* Reader_enumerate_fields(Reader *self, PyObject *args) {
if (set_error(r, NULL, "Field enumeration failed") < 0)
return NULL;
- value = PyBytes_FromString(field);
+ value = PyUnicode_FromString(field);
if (!value)
return NULL;