discovered_actions = actions_mgr.get_actions_dict() parsed_args = arguments.parse( arglist, "rdiff-backup {ver}".format(ver=Globals.version), actions_mgr.get_generic_parsers(), actions_mgr.get_parent_parsers_compat200(), discovered_actions) action = discovered_actions[parsed_args.action](parsed_args, Log, ErrorLog) action.pre_check() # implicit context_manager.__enter__() with action.connect() as conn_act: conn_act.check() conn_act.setup() conn_act.run() # implicit context_manager.__exit__(exc_type, exc_val, exc_tb)