Skip to content

Commit ee9ab0b

Browse files
committed
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.
1 parent dadcd3d commit ee9ab0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

systemd/_reader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ static PyObject* Reader_enumerate_fields(Reader *self, PyObject *args) {
965965
if (set_error(r, NULL, "Field enumeration failed") < 0)
966966
return NULL;
967967

968-
value = PyBytes_FromString(field);
968+
value = PyUnicode_FromString(field);
969969
if (!value)
970970
return NULL;
971971

0 commit comments

Comments
 (0)