diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-10 20:05:45 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-09-10 20:05:45 +0000 |
commit | 100492d98a199169a985086c20746dea7ff1fd3e (patch) | |
tree | 9562a2d69c60b57ab7320a28429e4de60fedadd2 /ipalib/errors.py | |
parent | 687f60356203a33b7af24842f24570a12d9b2039 (diff) | |
download | freeipa-100492d98a199169a985086c20746dea7ff1fd3e.tar.gz freeipa-100492d98a199169a985086c20746dea7ff1fd3e.tar.xz freeipa-100492d98a199169a985086c20746dea7ff1fd3e.zip |
285: Started work on Command.args_to_kw() method; added unit test for functionality so far in args_to_kw()
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index 5e8af9d4a..a961ecb60 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -107,6 +107,19 @@ class IPAError(Exception): return self.format % self.args +class ArgumentError(IPAError): + """ + Raised when a command is called with wrong number of arguments. + """ + + format = '%s %s' + + def __init__(self, command, error): + self.command = command + self.error = error + IPAError.__init__(self, command.name, error) + + class ValidationError(IPAError): """ Base class for all types of validation errors. |