Bug 995575
| Summary: | systemd journal python reader broken in 206 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Orion Poplawski <orion> |
| Component: | systemd | Assignee: | systemd-maint |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | johannbg, lnykryn, msekleta, notting, plautrba, steven, systemd-maint, vpavlin, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-14 22:16:30 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Orion Poplawski
2013-08-09 18:38:32 UTC
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 |