diff --git a/src/magicli.py b/src/magicli.py index 4a479eb..2fc8434 100644 --- a/src/magicli.py +++ b/src/magicli.py @@ -37,14 +37,16 @@ def magicli(exclude=['main'], help_message=True, glbls=None, argv=None): try: function_to_call(*args, **kwargs) - except TypeError as e: - print_error(e) - raise + except TypeError: + pass + # except TypeError as e: + # print_error(e) + # raise -def print_error(e): - print('\x1b[91mError:\x1b[0m ', end='') - print(e) +# def print_error(e): +# print('\x1b[91mError:\x1b[0m ', end='') +# print(e) def format_args(argv): @@ -58,7 +60,7 @@ def filter_functions(args): """ Gets list of functions from the globals variable of a specific module (default: __main__). """ - return [v for k, v in args.items() if inspect.isfunction(v) and v.__module__ == args['__name__']] + return [v for v in args.values() if inspect.isfunction(v) and v.__module__ == args['__name__']] def print_help_and_exit(app_name, functions):