From 0ceba59d87d0e3b2ecce623367b34a0dd339c1c4 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 15 Oct 2010 15:03:51 -0400 Subject: Add Requires on ipa-client to ipa-admintools, ensure ipa client is configured It makes little sense to install ipa-admintools without ipa-client, require it. Also see if the client has been configured. This is a bit tricky since we have a full set of defaults. Add a new env option that gets set if at least one configuration file is loaded. ticket 213 --- ipalib/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index 44f9c813..dff709af 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -37,7 +37,7 @@ import frontend import backend import plugable import util -from errors import PublicError, CommandError, HelpError, InternalError, NoSuchNamespaceError, ValidationError, NotFound +from errors import PublicError, CommandError, HelpError, InternalError, NoSuchNamespaceError, ValidationError, NotFound, NotConfiguredError from constants import CLI_TAB from parameters import Password, Bytes, File from text import _ @@ -945,6 +945,8 @@ def run(api): api.register(klass) api.load_plugins() api.finalize() + if not 'config_loaded' in api.env: + raise NotConfiguredError() sys.exit(api.Backend.cli.run(argv)) except KeyboardInterrupt: print '' -- cgit