diff options
| author | Daniel Watkins <daniel.watkins@canonical.com> | 2015-02-11 11:55:25 +0000 |
|---|---|---|
| committer | Daniel Watkins <daniel.watkins@canonical.com> | 2015-02-11 11:55:25 +0000 |
| commit | cf48254eb4a8364ceaeb710607c4b21ba5cbe8a6 (patch) | |
| tree | 9eda5d823fa7e671d6c2e3ebce62f6fe999d852c /cloudinit/util.py | |
| parent | 62f5f10c2572585b89f5c837b84015a86e6af357 (diff) | |
| download | vyos-cloud-init-cf48254eb4a8364ceaeb710607c4b21ba5cbe8a6.tar.gz vyos-cloud-init-cf48254eb4a8364ceaeb710607c4b21ba5cbe8a6.zip | |
Encode messages to utf-8 before writing them to the console in util.multi_log.
Diffstat (limited to 'cloudinit/util.py')
| -rw-r--r-- | cloudinit/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index d63b4bf2..eba93d1c 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -405,7 +405,7 @@ def multi_log(text, console=True, stderr=True, conpath = "/dev/console" if os.path.exists(conpath): with open(conpath, 'wb') as wfh: - wfh.write(text) + wfh.write(text.encode('utf-8')) wfh.flush() else: # A container may lack /dev/console (arguably a container bug). If |
