From 75327e7e341830a3c67d73ecd910654ef1f60ce7 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Mon, 8 Apr 2019 13:08:12 +0530 Subject: [PATCH] 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 --- src/tools/cephfs/cephfs-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.47.3