From 0d6d0975e641f4c5b978fd9aab77fdb86cfb0782 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 2 Dec 2014 19:38:53 -0800 Subject: [PATCH] misc.append_lines_to_file: respect sudo Fixes: #10239 Signed-off-by: Dan Mick --- teuthology/misc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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): -- 2.39.5