From: Kefu Chai Date: Tue, 12 May 2020 14:15:57 +0000 (+0800) Subject: cephfs-shell: fix warnings reported by flake8 X-Git-Tag: wip-pdonnell-testing-20200918.022351~1297^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8a26c9055acda6abc3c951371f51f18729ea60b8;p=ceph-ci.git cephfs-shell: fix warnings reported by flake8 Signed-off-by: Kefu Chai --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 007bd4e5d9a..81e25d16dae 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -200,11 +200,11 @@ def print_long(path, is_dir, human_readable): poutput('{}\t{:10s} {} {} {} {}'.format( mode_notation(info.st_mode), humansize(info.st_size), info.st_uid, - info.st_gid, info.st_mtime, pretty, sep='\t')) + info.st_gid, info.st_mtime, pretty)) else: poutput('{} {:12d} {} {} {} {}'.format( mode_notation(info.st_mode), info.st_size, info.st_uid, - info.st_gid, info.st_mtime, pretty, sep='\t')) + info.st_gid, info.st_mtime, pretty)) def word_len(word): @@ -364,7 +364,7 @@ class CephFSShell(Cmd): return None doc_lines = getattr( self, 'do_' + command).__doc__.expandtabs().splitlines() - if ''in doc_lines: + if '' in doc_lines: blank_idx = doc_lines.index('') usage = doc_lines[:blank_idx] description = doc_lines[blank_idx + 1:] @@ -701,7 +701,7 @@ class CephFSShell(Cmd): elif is_file_exists(args.remote_path): copy_to_local(root_src_dir, root_dst_dir + b'/' + root_src_dir) - elif b'/'in root_src_dir and is_file_exists(fname[1], fname[0]): + elif b'/' in root_src_dir and is_file_exists(fname[1], fname[0]): copy_to_local(root_src_dir, root_dst_dir) else: files = list(reversed(sorted(dirwalk(root_src_dir))))