]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc.append_lines_to_file: respect sudo 375/head
authorDan Mick <dan.mick@redhat.com>
Wed, 3 Dec 2014 03:38:53 +0000 (19:38 -0800)
committerDan Mick <dan.mick@redhat.com>
Thu, 4 Dec 2014 01:02:48 +0000 (17:02 -0800)
Fixes: #10239
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/misc.py

index cec26e9ba309e20cf060a089d7aea842d154a53d..08f0e3b260dd397ef38055eed84dc3e5f628dd2b 100644 (file)
@@ -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):