sh_cpl/src/cpl_cli/error.py

18 lines
469 B
Python
Raw Normal View History

2021-08-05 14:21:42 +02:00
from cpl_core.console.foreground_color_enum import ForegroundColorEnum
from cpl_core.console.console import Console
2021-03-04 06:42:40 +01:00
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)