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: v15.1.0~2211^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26daf81c1cc563ec1303321f801e93a9ca2adb7d;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 --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index a91aa13402dd..88f6ba48867e 100755 --- 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: