AttributeError chaining bug #1944 fix

This commit is contained in:
Lev Maximov 2016-09-18 22:34:48 +07:00
parent 8639bf7554
commit 65be1231b1
1 changed files with 3 additions and 4 deletions

View File

@ -205,9 +205,8 @@ class PyobjContext(object):
class PyobjMixin(PyobjContext):
def obj():
def fget(self):
try:
return self._obj
except AttributeError:
obj = getattr(self, '_obj', None)
if obj is None:
self._obj = obj = self._getobj()
return obj
def fset(self, value):