summaryrefslogtreecommitdiff
path: root/bin/cloud-init
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-02-10 21:33:11 +0000
committerScott Moser <smoser@ubuntu.com>2015-02-10 21:33:11 +0000
commitb8eb55f9acdf92a58d3c72b0c5e5437c4f0272c1 (patch)
tree53cfd95f69aafca83ea8bdff0b6ab0d494ae530c /bin/cloud-init
parent5c536ac1e89acfd71bf45e39e2bcbb1f5498c798 (diff)
downloadvyos-cloud-init-b8eb55f9acdf92a58d3c72b0c5e5437c4f0272c1.tar.gz
vyos-cloud-init-b8eb55f9acdf92a58d3c72b0c5e5437c4f0272c1.zip
use encode_text
Diffstat (limited to 'bin/cloud-init')
-rwxr-xr-xbin/cloud-init2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index d67b2b6d..6c83c2e7 100755
--- a/bin/cloud-init
+++ b/bin/cloud-init
@@ -428,7 +428,7 @@ def atomic_write_json(path, data):
try:
tf = tempfile.NamedTemporaryFile(dir=os.path.dirname(path),
delete=False)
- tf.write((json.dumps(data, indent=1) + "\n").encode())
+ tf.write(util.encode_text(json.dumps(data, indent=1) + "\n"))
tf.close()
os.rename(tf.name, path)
except Exception as e: