diff --git a/doc/guide/guide.org b/doc/guide/guide.org index 1c2f4e2a5..89820704f 100644 --- a/doc/guide/guide.org +++ b/doc/guide/guide.org @@ -738,19 +738,19 @@ cli_plugins = ( show_mappings, ) + def run(api): error = None try: - (options, argv) = api.bootstrap_with_global_options(context='cli') + (_options, argv) = api.bootstrap_with_global_options(context='cli') for klass in cli_plugins: - api.register(klass) - api.load_plugins() + api.add_plugin(klass) api.finalize() - if not 'config_loaded' in api.env: + if not 'config_loaded' in api.env and not 'help' in argv: raise NotConfiguredError() sys.exit(api.Backend.cli.run(argv)) except KeyboardInterrupt: - print '' + print('') api.log.info('operation aborted') except PublicError as e: error = e