[systemd-devel] python - reading the journal

Steven Hiscocks steven-systemd at hiscocks.me.uk
Fri Feb 15 09:28:43 PST 2013

On 11/02/13 05:49, Zbigniew Jędrzejewski-Szmek wrote:
> On Fri, Feb 08, 2013 at 10:20:57PM +0000, Steven Hiscocks wrote:
>> I thought the easiest way was to just inherit the Journal (now
>> _Journal), replacing __new__ with all the python RunString stuff. https://github.com/kwirk/systemd/commit/9003fdbc69577840ab6a1501a1c49f7377b6124d
> Hi Steven,
> comments on your patch:
> The default conversion must be bytes, otherwise every new binary
> message field that this module doesn't know about will cause failure.
> It is better to default to bytes.
Currently I've put default to unicode, which falls back to bytes if 
their is an exception is raised.
> ...
> Zbyszek

I've been away on a work trip this week so haven't been able to make 
much progress. I've pushed some changes to a branch on github: 

Steven Hiscocks

More information about the systemd-devel mailing list