From: Varsha Rao Date: Mon, 8 Apr 2019 07:38:12 +0000 (+0530) Subject: cephfs-shell: Use colorama module instead of colorize X-Git-Tag: v15.1.0~2992^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27427%2Fhead;p=ceph.git cephfs-shell: Use colorama module instead of colorize Remove references to colorize attributes. As in cmd2 module, colorize attribute is deleted. Instead use colorama module. Fixes: https://tracker.ceph.com/issues/38996 Signed-off-by: Varsha Rao --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 88e45f1aacfd..23ef9789bb15 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -168,7 +168,7 @@ def print_long(shell, file_name, is_dir, human_readable): info = cephfs.stat(file_name) file_name = os.path.basename(file_name.decode('utf-8')) if is_dir: - file_name = shell.colorize(file_name+'/', 'blue') + file_name = colorama.Style.BRIGHT + colorama.Fore.CYAN + file_name + '/' + colorama.Style.RESET_ALL if human_readable: shell.poutput('{}\t{:10s} {} {} {} {}'.format( mode_notation(info.st_mode), @@ -590,7 +590,7 @@ exists.') print_long(self, cephfs.getcwd().decode( 'utf-8') + dir_name + '/' + path, is_dir, False) elif is_dir: - values.append(self.colorize(path + '/', 'blue')) + values.append(colorama.Style.BRIGHT + colorama.Fore.CYAN + path + '/') else: values.append(path) if not args.long: