From: Dan Mick Date: Wed, 3 Dec 2014 03:38:53 +0000 (-0800) Subject: misc.append_lines_to_file: respect sudo X-Git-Tag: 1.1.0~1061^2~15^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0d6d0975e641f4c5b978fd9aab77fdb86cfb0782;p=teuthology.git misc.append_lines_to_file: respect sudo Fixes: #10239 Signed-off-by: Dan Mick --- diff --git a/teuthology/misc.py b/teuthology/misc.py index cec26e9ba3..08f0e3b260 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -633,11 +633,10 @@ def append_lines_to_file(remote, path, lines, sudo=False): # in case of connectivity of loss, and then mv it to the # actual desired location data += lines - temp_file_path write_file(remote, temp_file_path, data) # then do a 'mv' to the actual file location - move_file(remote, temp_file_path, path) + move_file(remote, temp_file_path, path, sudo) def create_file(remote, path, data="", permissions=str(644), sudo=False):