From 6c526fbdd9b812d16728160f818126e6f6abff14 Mon Sep 17 00:00:00 2001 From: "J.P" <70083705+stapmoshun@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:36:19 -0500 Subject: [PATCH] remove duplicate code --- src/cloudmesh/common/console.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cloudmesh/common/console.py b/src/cloudmesh/common/console.py index 3e323ac..78767b7 100644 --- a/src/cloudmesh/common/console.py +++ b/src/cloudmesh/common/console.py @@ -367,8 +367,6 @@ def cprint(message, color="BLUE", prefix=""): message = message or "" prefix = prefix or "" #RichConsole.print(prefix + message, style=color.lower()) - c = Console.theme[color.upper()] - RichConsole.print(prefix + message, style=c) # print( # Console.theme_color[color] + prefix + message + Console.theme_color["ENDC"] @@ -376,7 +374,8 @@ def cprint(message, color="BLUE", prefix=""): if isinstance(message, Text): RichConsole.print(prefix, message, sep="") else: - RichConsole.print(prefix + message, style=Console.theme_color[color.upper()]) + c = Console.theme[color.upper()] + RichConsole.print(prefix + message, style=c) @staticmethod def text(color="RED", prefix=None, message=None):