summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-10-15 15:03:51 -0400
committerRob Crittenden <rcritten@redhat.com>2010-10-15 15:03:51 -0400
commit0ceba59d87d0e3b2ecce623367b34a0dd339c1c4 (patch)
tree1b2183c82851ec7b8b2f0925976e807e3db61be3 /ipalib/cli.py
parent264413bcb9d5adaeb6815565cd099ea06e43e532 (diff)
downloadfreeipa-0ceba59d87d0e3b2ecce623367b34a0dd339c1c4.tar.gz
freeipa-0ceba59d87d0e3b2ecce623367b34a0dd339c1c4.tar.xz
freeipa-0ceba59d87d0e3b2ecce623367b34a0dd339c1c4.zip
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
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 44f9c813c..dff709af0 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 ''