sh_cpl/src/cpl_cli/error.py

18 lines
437 B
Python
Raw Normal View History

2021-03-14 10:31:45 +01:00
from cpl.console import ForegroundColorEnum
2021-03-04 06:42:40 +01:00
from cpl.console.console import Console
class Error:
@staticmethod
def error(message: str):
Console.error(message)
2021-03-08 22:29:28 +01:00
Console.error('Run \'cpl help\'\n')
2021-03-14 10:31:45 +01:00
@staticmethod
def warn(message: str):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(message)
Console.set_foreground_color(ForegroundColorEnum.default)