diff options
| author | zackchen <zackchen517@gmail.com> | 2017-02-28 17:55:26 +0800 |
|---|---|---|
| committer | zackchen <zackchen517@gmail.com> | 2017-03-14 10:25:09 +0800 |
| commit | 000eaa355472f63ae112cf1e1dcedc2c094ed5c1 (patch) | |
| tree | 2cf83c53d2fb0dae601bbf1a2c69f346c7f0180d /ironic_python_agent/utils.py | |
| parent | 9b77ba530a6038b31ca503bc088100d4d0bc2160 (diff) | |
| download | ironic-python-agent-000eaa355472f63ae112cf1e1dcedc2c094ed5c1.tar.gz | |
Fix logs encoding in py3
Make sure that logs are encoded as text (not byte strings) in
python3 to allow theirs serialization in JSON.
Closes-Bug: #1668533
Change-Id: I3d0d87ca766146457d905f89c26331a415bd54f8
Diffstat (limited to 'ironic_python_agent/utils.py')
| -rw-r--r-- | ironic_python_agent/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py index ddfe25ca..f0951270 100644 --- a/ironic_python_agent/utils.py +++ b/ironic_python_agent/utils.py @@ -383,7 +383,7 @@ def gzip_and_b64encode(io_dict=None, file_list=None): tar.add(f) fp.seek(0) - return base64.encode_as_bytes(fp.getvalue()) + return base64.encode_as_text(fp.getvalue()) def collect_system_logs(journald_max_lines=None): |
