From 36b79316cd469f1f290c0dea7c2485cea2be474a Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Wed, 16 Feb 2022 14:35:34 +0330 Subject: style updates --- bin/colo | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'bin/colo') diff --git a/bin/colo b/bin/colo index 1fe3af5..67cd899 100755 --- a/bin/colo +++ b/bin/colo @@ -2,7 +2,6 @@ # _*_ coding=utf-8 _*_ import argparse -import code import signal import sys from html.parser import HTMLParser @@ -313,7 +312,8 @@ class ColoParser(HTMLParser): COLO_LIST.append(data) -def premain(argparser): +def main(): + argparser = Argparser() signal.signal(signal.SIGINT, SigHandler_SIGINT) PRINT_LIST = str() lines = COLORS.split("\n") @@ -396,23 +396,5 @@ def premain(argparser): print(PRINT_LIST) -def main(): - argparser = Argparser() - if argparser.args.dbg: - try: - premain(argparser) - except Exception as e: - if hasattr(e, "__doc__"): - print(e.__doc__) - if hasattr(e, "message"): - print(e.message) - variables = globals().copy() - variables.update(locals()) - shell = code.InteractiveConsole(variables) - shell.interact(banner="DEBUG REPL") - else: - premain(argparser) - - if __name__ == "__main__": main() -- cgit v1.2.3