[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:
parent
4259fe0072
commit
1df3467888
|
@ -350,8 +350,6 @@ class Field(object):
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
""" Access non-slot field attribute. """
|
""" Access non-slot field attribute. """
|
||||||
if name == '_attrs':
|
|
||||||
raise AttributeError(name)
|
|
||||||
try:
|
try:
|
||||||
return self._attrs[name]
|
return self._attrs[name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue