mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
doc: sync guide.org with cli.py
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
ffadcb0414
commit
bccb243b05
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user