77: A few stylistic changes

This commit is contained in:
Jason Gerard DeRose 2008-08-07 23:11:02 +00:00
parent 14a0658464
commit 62dc9a78fd

View File

@ -79,14 +79,13 @@ class opt(plugable.ReadOnly):
def validate(self, value): def validate(self, value):
for rule in self.rules: for rule in self.rules:
msg = rule(value) msg = rule(value)
if msg is None: if msg is not None:
continue raise errors.RuleError(
raise errors.RuleError( self.__class__.__name__,
self.__class__.__name__, value,
value, rule,
rule, msg,
msg, )
)
@ -136,6 +135,7 @@ class cmd(plugable.Plugin):
(args, kw) = self.normalize(*args, **kw) (args, kw) = self.normalize(*args, **kw)
(args, kw) = self.autofill(*args, **kw) (args, kw) = self.autofill(*args, **kw)
self.validate(*args, **kw) self.validate(*args, **kw)
self.execute(*args, **kw)