summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-04-20 13:58:26 -0400
committerRob Crittenden <rcritten@redhat.com>2009-04-20 13:58:26 -0400
commit64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a (patch)
treea4543df175f8bf0efcd200662a9e7f00fea7bf52 /ipalib/cli.py
parenta9387b48e66ca93cc8323869de25fe3f777567b6 (diff)
downloadfreeipa.git-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.tar.gz
freeipa.git-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.tar.xz
freeipa.git-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.zip
Finish work replacing the errors module with errors2
Once this is committed we can start the process of renaming errors2 as errors. I thought that combinig this into one commit would be more difficult to review.
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 11b56e36..36c945f2 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -36,8 +36,7 @@ import frontend
import backend
import plugable
import util
-from errors2 import PublicError, CommandError, HelpError, InternalError
-import errors
+from errors2 import PublicError, CommandError, HelpError, InternalError, NoSuchNamespaceError, ValidationError
from constants import CLI_TAB
from parameters import Password, Bytes
from request import ugettext as _
@@ -456,7 +455,7 @@ class show_api(frontend.Application):
else:
for name in namespaces:
if name not in self.api:
- raise errors.NoSuchNamespaceError(name)
+ raise NoSuchNamespaceError(name=name)
names = namespaces
lines = self.__traverse(names)
ml = max(len(l[1]) for l in lines)
@@ -478,7 +477,6 @@ class show_api(frontend.Application):
s = '%d attributes show.' % len(lines)
self.Backend.textui.print_dashed(s)
-
def __traverse(self, names):
lines = []
for name in names:
@@ -635,7 +633,7 @@ class cli(backend.Executioner):
if value is not None:
kw[param.name] = value
break
- except errors.ValidationError, e:
+ except ValidationError, e:
error = e.error