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.
This commit is contained in:
Rob Crittenden committed 2009-04-20 13:58:26 -04:00
1 parent a9387b48e6
commit 64fa3dd4c3
15 files changed
+350 -854

No files matched your search

+3 -5
View File
@@ -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