diff --git a/colors/cthon.py b/colors/cthon.py index 4481b9e..7dda6ac 100644 --- a/colors/cthon.py +++ b/colors/cthon.py @@ -5,6 +5,7 @@ import termcolor colors = { "b" : "blue", "g" : "green", "s" : "cyan", "l" : "yellow" } last = "white" newline = False +status=0 text = "" def print_text(color, attr=None): @@ -20,6 +21,7 @@ while c := sys.stdin.read(1): text = "\n" + text if newline else text newline = False print_text("red", "bold") + status=1 elif match := re.match("^./server -([bgsl]) .*?\n$", text): print_text(colors[match.group(1)], None) elif match := re.match("^Waiting for '([bgsl])' to finish...", text): @@ -33,3 +35,5 @@ while c := sys.stdin.read(1): if len(text) > 1: print_text("white", "bold") text = "" + +sys.exit(status)