lib: fix lazy_property descriptor

see also: https://forge.frm2.tum.de/review/c/frm2/nicos/nicos-core/+/21285

Change-Id: I5ea4c5bfbad7f871dd819b0cf4fdd479c79c47a2
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21288
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
This commit is contained in:
Enrico Faulhaber 2019-09-23 13:41:29 +02:00
parent d187b3240b
commit 6acc82d808

View File

@ -62,7 +62,7 @@ class lazy_property(object):
def __get__(self, obj, obj_class):
if obj is None:
return obj
return self
obj.__dict__[self.__name__] = self._func(obj)
return obj.__dict__[self.__name__]