Backport fixes and hwdb changes
This commit is contained in:
parent
7c25c33b5a
commit
930e1b89bd
117 changed files with 6591 additions and 155 deletions
27
0079-systemd-python-convert-keyword-value-to-string.patch
Normal file
27
0079-systemd-python-convert-keyword-value-to-string.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 044615d3520fe1884b6d1c410b99c26c0b02d41a Mon Sep 17 00:00:00 2001
|
||||
From: Richard Marko <rmarko@fedoraproject.org>
|
||||
Date: Tue, 5 Nov 2013 15:41:20 +0100
|
||||
Subject: [PATCH] systemd-python: convert keyword value to string
|
||||
|
||||
Allows using journal.send('msg', PRIORITY=journal.LOG_CRIT)
|
||||
|
||||
Before this commit this results in
|
||||
TypeError: cannot concatenate 'str' and 'int' objects
|
||||
and requires passing PRIORITY value as string to work.
|
||||
---
|
||||
src/python-systemd/journal.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py
|
||||
index d0bcd24..9c7e004 100644
|
||||
--- a/src/python-systemd/journal.py
|
||||
+++ b/src/python-systemd/journal.py
|
||||
@@ -352,6 +352,8 @@ def get_catalog(mid):
|
||||
def _make_line(field, value):
|
||||
if isinstance(value, bytes):
|
||||
return field.encode('utf-8') + b'=' + value
|
||||
+ elif isinstance(value, int):
|
||||
+ return field + '=' + str(value)
|
||||
else:
|
||||
return field + '=' + value
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue