Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfleischer committed Jan 8, 2024
1 parent aa9d66e commit 6c526fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cloudmesh/common/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,15 @@ 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"]
# )
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):
Expand Down

0 comments on commit 6c526fb

Please sign in to comment.