From cd2d1848dd33d368c386065f02599d13bd110ffa Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 8 Apr 2023 17:14:34 +0300 Subject: [PATCH] Updated for try block --- slpkg/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/slpkg/main.py b/slpkg/main.py index 1ce1f502..2877c874 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -823,12 +823,12 @@ def main(): '-t': argparse.tracking } - #try: - arguments[args[0]]() - #except (KeyError, IndexError) as err: - logger = logging.getLogger(__name__) - logger.info('%s: %s', main.__name__, err) - usage.help_short(1) + try: + arguments[args[0]]() + except (KeyError, IndexError) as err: + logger = logging.getLogger(__name__) + logger.info('%s: %s', main.__name__, err) + usage.help_short(1) if __name__ == '__main__':