Description of problem: # python Python 2.7.5 (default, Aug 4 2013, 08:19:47) [GCC 4.8.1 20130717 (Red Hat 4.8.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from systemd import journal >>> j = journal.Reader(converters={'__CURSOR': lambda x: x}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/systemd/journal.py", line 153, in __init__ super(Reader, self).__init__(flags, path, files) TypeError: argument 3 must be (unspecified), not None Version-Release number of selected component (if applicable): systemd-python-206-2.fc20.x86_64 Expected results: systemd-python-204-9.fc19.x86_64 # python Python 2.7.5 (default, Jul 8 2013, 09:48:59) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from systemd import journal >>> j = journal.Reader(converters={'__CURSOR': lambda x: x}) >>>
Or even: >>> from systemd import journal >>> j = journal.Reader() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/systemd/journal.py", line 153, in __init__ super(Reader, self).__init__(flags, path, files) TypeError: argument 3 must be (unspecified), not None
Patch along the lines of below resolves this; by making `None` an acceptable value. --- diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c index a678f69..604630d 100644 --- a/src/python-systemd/_reader.c +++ b/src/python-systemd/_reader.c @@ -73,6 +73,11 @@ static int strv_converter(PyObject* obj, void *_result) { if (!obj) goto cleanup; + if (obj == Py_None) { + *result = NULL; + return 1; + } + if (!PySequence_Check(obj)) return 0;
This is also fixed in 206-3.fc20, though not noted in the changelog.
systemd-204-13.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/systemd-204-13.fc19
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20