summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/cloud-init2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index 866f8ca4..d67b2b6d 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")
+ tf.write((json.dumps(data, indent=1) + "\n").encode())
tf.close()
os.rename(tf.name, path)
except Exception as e: