summaryrefslogtreecommitdiff
path: root/cloudinit/distros/arch.py
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-07-21 11:56:50 -0700
committerScott Moser <smoser@brickies.net>2017-07-24 15:59:41 -0400
commit85c984c3c74b0a8751698e20915b89756580b09f (patch)
treeecb0fd88d1f019632ded07aa0decb60bcc35db72 /cloudinit/distros/arch.py
parent681baff19dc16ef2efdfb8499ad74aea0efbe467 (diff)
downloadvyos-cloud-init-85c984c3c74b0a8751698e20915b89756580b09f.tar.gz
vyos-cloud-init-85c984c3c74b0a8751698e20915b89756580b09f.zip
archlinux: fix set hostname usage of write_file.
cloud-init fails to set the hostname on Arch Linux because that _write_hostname passes conf instead of str(conf) to util.write_file. LP: #1705306
Diffstat (limited to 'cloudinit/distros/arch.py')
-rw-r--r--cloudinit/distros/arch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/distros/arch.py b/cloudinit/distros/arch.py
index 75d46201..b4c0ba72 100644
--- a/cloudinit/distros/arch.py
+++ b/cloudinit/distros/arch.py
@@ -119,7 +119,7 @@ class Distro(distros.Distro):
if not conf:
conf = HostnameConf('')
conf.set_hostname(your_hostname)
- util.write_file(out_fn, conf, 0o644)
+ util.write_file(out_fn, str(conf), omode="w", mode=0o644)
def _read_system_hostname(self):
sys_hostname = self._read_hostname(self.hostname_conf_fn)