]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs: fix mkdirs(exist_ok) call 23480/head
authorKefu Chai <kchai@redhat.com>
Sat, 4 Aug 2018 12:52:29 +0000 (20:52 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 9 Aug 2018 13:59:00 +0000 (21:59 +0800)
we need to use pathlib.Path.mkdirs(parents=True, exist_ok=True) or
os.mkdirs(path), but not both.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/cephfs/cephfs-shell

index 96a5b0a667fb1a4d4b2ad3a98b0b9d958e6e0e9e..06abf0b7574a051e758828a621dcc9bd497507fb 100644 (file)
@@ -220,8 +220,7 @@ def copy_from_local(shell, local_path, remote_path):
 def copy_to_local(shell, remote_path, local_path):
     local_dir = os.path.dirname(local_path)
     if not os.path.exists(local_dir):
-        os.makedirs(local_dir, exist_ok=True)
-
+        os.makedirs(local_dir)
     fd = None
     if len(remote_path.rsplit('/', 1)) > 2 and remote_path.rsplit('/', 1)[1] == '':
         return