]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: Remove undefined variable files in do_rm() 29158/head
authorVarsha Rao <varao@redhat.com>
Mon, 24 Jun 2019 08:24:19 +0000 (13:54 +0530)
committerNathan Cutler <ncutler@suse.com>
Mon, 22 Jul 2019 09:48:41 +0000 (11:48 +0200)
Instead of args.paths list use file_paths.

Fixes: https://tracker.ceph.com/issues/40489
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 26daf81c1cc563ec1303321f801e93a9ca2adb7d)

src/tools/cephfs/cephfs-shell

index 05e1fa44773d2fbaf749fc06f6345bd137db069a..aca1e480097126e3a842083435e897ad920eff51 100644 (file)
@@ -843,9 +843,10 @@ sub-directories, files')
         """
         Remove a specific file
         """
-        for path in args.paths:
+        file_paths = args.paths
+        for path in file_paths:
             if path.count('*') > 0:
-                files.extend([i for i in get_all_possible_paths(
+                file_paths.extend([i for i in get_all_possible_paths(
                     path) if is_file_exists(i)])
             else:
                 try: