summaryrefslogtreecommitdiff
path: root/cloudinit/distros/__init__.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-20 17:56:22 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-09-20 17:56:22 -0700
commite8a10a41d22876d555084def823817337d9c2a80 (patch)
tree200f2f26a2bc362d0a55fdf7a743b26cf5d97ff0 /cloudinit/distros/__init__.py
parent94b9647e4df742982cac8a2c2925fb4894281dbf (diff)
downloadvyos-cloud-init-e8a10a41d22876d555084def823817337d9c2a80.tar.gz
vyos-cloud-init-e8a10a41d22876d555084def823817337d9c2a80.zip
Use only util methods for reading/loading/appending/peeking
at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
Diffstat (limited to 'cloudinit/distros/__init__.py')
-rw-r--r--cloudinit/distros/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 3e9d934d..f6aa8d99 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -343,8 +343,7 @@ class Distro(object):
else:
try:
- with open(sudo_file, 'a') as f:
- f.write(content)
+ util.append_file(sudo_file, content)
except IOError as e:
util.logexc(LOG, "Failed to write %s" % sudo_file, e)
raise e