From 2d322fca242c75fde8809bcb9cbc065523bd6922 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Mon, 24 Jun 2019 13:54:19 +0530 Subject: [PATCH] cephfs-shell: Remove undefined variable files in do_rm() Instead of args.paths list use file_paths. Fixes: https://tracker.ceph.com/issues/40489 Signed-off-by: Varsha Rao (cherry picked from commit 26daf81c1cc563ec1303321f801e93a9ca2adb7d) --- src/tools/cephfs/cephfs-shell | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 05e1fa44773d..aca1e4800971 100644 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -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: -- 2.47.3