misc: allow journald logging of unicode strings (#30890)
This commit is contained in:
parent
f079e95570
commit
5264b1c6e0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue