From: Varsha Rao Date: Mon, 24 Jun 2019 08:24:19 +0000 (+0530) Subject: cephfs-shell: Remove undefined variable files in do_rm() X-Git-Tag: v14.2.3~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2d322fca242c75fde8809bcb9cbc065523bd6922;p=ceph.git 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) --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 05e1fa44773..aca1e480097 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: