[IMP] fields: remove unnecessary code
In `__getattr__`, remove the test on accessing `_attrs`. This situation should never happen, since the attribute `_attrs` is set in method `__init__()`.
This commit is contained in:
@@ -350,8 +350,6 @@ class Field(object):
|
||||
|
||||
def __getattr__(self, name):
|
||||
""" Access non-slot field attribute. """
|
||||
if name == '_attrs':
|
||||
raise AttributeError(name)
|
||||
try:
|
||||
return self._attrs[name]
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user