mirror of
https://git.proxmox.com/git/systemd
synced 2026-02-03 22:44:41 +00:00
This commit was created using the following commands and then fixing up debian/patches/series manually. $ git config diff.renames false $ git rebase --onto debian/208-5 v208 stable/v208-stable $ git checkout -b patch-queue/experimental HEAD $ gbp-pq export --no-patch-numbers $ git add --ignore-removal debian/patches/
27 lines
920 B
Diff
27 lines
920 B
Diff
From: Richard Marko <rmarko@fedoraproject.org>
|
|
Date: Tue, 5 Nov 2013 15:41:20 +0100
|
|
Subject: 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
|
|
|