summaryrefslogtreecommitdiff
path: root/cloudinit/distros/__init__.py
diff options
context:
space:
mode:
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