misc: allow journald logging of unicode strings (#30890)

This commit is contained in:
Frédéric Péters 2019-02-25 21:41:11 +01:00
parent f079e95570
commit 5264b1c6e0
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ def _valid_field_name(s):
def _make_line(field, value):
if isinstance(value, bytes):
return field.encode('utf-8') + b'=' + value
elif isinstance(value, str):
elif isinstance(value, basestring):
return field + '=' + value
else:
return field + '=' + str(value)