# HG changeset patch # User Marcin Kuzminski # Date 2012-06-20 19:10:40 # Node ID c4d418b440d116cba08e4e993a425f6f3a24c702 # Parent a93db48c75f5c9c4c4c620d511e87d0c9341bffb small fix for lazy property diff --git a/rhodecode/lib/vcs/utils/lazy.py b/rhodecode/lib/vcs/utils/lazy.py --- a/rhodecode/lib/vcs/utils/lazy.py +++ b/rhodecode/lib/vcs/utils/lazy.py @@ -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