]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc.create_file: if sudo, must sudo for chmod as well.
authorDan Mick <dan.mick@redhat.com>
Wed, 3 Dec 2014 03:21:16 +0000 (19:21 -0800)
committerDan Mick <dan.mick@redhat.com>
Thu, 4 Dec 2014 01:02:48 +0000 (17:02 -0800)
Fixes: #10238
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/misc.py

index 52d850e1f01b22100727adb3680130ca5d153c0f..cec26e9ba309e20cf060a089d7aea842d154a53d 100644 (file)
@@ -650,7 +650,11 @@ def create_file(remote, path, data="", permissions=str(644), sudo=False):
     args.extend([
         'touch',
         path,
-        run.Raw('&&'),
+        run.Raw('&&')
+    ])
+    if sudo:
+        args.append('sudo')
+    args.extend([
         'chmod',
         permissions,
         '--',