diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-07-30 15:18:53 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-07-30 15:18:53 -0700 |
commit | 2fd22530737468a00bfb58eed9b6e231aa6d6652 (patch) | |
tree | 8c4a4ab45b875dcfdd473dc61fa173c91a5673f4 /cloudinit/distros | |
parent | 55472eb02eaa5b88676a96e006f6838020f8ffe3 (diff) | |
download | vyos-cloud-init-2fd22530737468a00bfb58eed9b6e231aa6d6652.tar.gz vyos-cloud-init-2fd22530737468a00bfb58eed9b6e231aa6d6652.zip |
Ensure that when a resolve conf object is written we pass the str() version of it
Instead of passing the raw object and expecting the write_file to work automatically
make sure we explicitly pass the string version of it so that the write_file routine
can correctly encode/decode it as needed.
LP: #1479988
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/rhel_util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/distros/rhel_util.py b/cloudinit/distros/rhel_util.py index 84aad623..903d7793 100644 --- a/cloudinit/distros/rhel_util.py +++ b/cloudinit/distros/rhel_util.py @@ -86,4 +86,4 @@ def update_resolve_conf_file(fn, dns_servers, search_servers): r_conf.add_search_domain(s) except ValueError: util.logexc(LOG, "Failed at adding search domain %s", s) - util.write_file(fn, r_conf, 0o644) + util.write_file(fn, str(r_conf), 0o644) |