diff options
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r-- | ipalib/cli.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 11b56e36f..36c945f2b 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 |