Browse files

Make options.__getattr__ raise AttributeError instead of Error for co…


with standard attribute lookups (so getattr(options, 'foo', None) works
if no option 'foo' has been defined).
  • Loading branch information...
1 parent 218dd1e commit b5365d8c015b11a26b5ac6f29a40cd4d59e550e3 Ben Darnell committed Apr 5, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornado/
@@ -175,7 +175,7 @@ def instance(cls):
def __getattr__(self, name):
if isinstance(self.get(name), _Option):
return self[name].value()
- raise Error("Unrecognized option %r" % name)
+ raise AttributeError("Unrecognized option %r" % name)
class _Option(object):

0 comments on commit b5365d8

Please sign in to comment.