Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…nsistency

with standard attribute lookups (so getattr(options, 'foo', None) works
if no option 'foo' has been defined).
  • Loading branch information...
commit b5365d8c015b11a26b5ac6f29a40cd4d59e550e3 1 parent 218dd1e
authored April 05, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  tornado/options.py
2  tornado/options.py
@@ -175,7 +175,7 @@ def instance(cls):
175 175
     def __getattr__(self, name):
176 176
         if isinstance(self.get(name), _Option):
177 177
             return self[name].value()
178  
-        raise Error("Unrecognized option %r" % name)
  178
+        raise AttributeError("Unrecognized option %r" % name)
179 179
 
180 180
 
181 181
 class _Option(object):

0 notes on commit b5365d8

Please sign in to comment.
Something went wrong with that request. Please try again.