Changeset - c4d418b440d1
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-20 21:10:40
marcin@python-works.com
small fix for lazy property
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/utils/lazy.py
Show inline comments
 
@@ -17,11 +17,12 @@ class LazyProperty(object):
 

	
 
    def __init__(self, func):
 
        self._func = func
 
        self.__module__ = func.__module__
 
        self.__name__ = func.__name__
 
        self.__doc__ = func.__doc__
 

	
 
    def __get__(self, obj, klass=None):
 
        if obj is None:
 
            return None
 
            return self
 
        result = obj.__dict__[self.__name__] = self._func(obj)
 
        return result
0 comments (0 inline, 0 general)