diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-07-28 15:24:49 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-07-28 15:24:49 +0300 |
commit | 15c3461b1f168b154419ded41498c9adc4ab60be (patch) | |
tree | 2a66d20768ceb9244cde248073d7804a7920e646 /mediagoblin | |
parent | 874439bd80e209129fcd56b169a734906c9f8968 (diff) | |
download | mediagoblin-15c3461b1f168b154419ded41498c9adc4ab60be.tar.lz mediagoblin-15c3461b1f168b154419ded41498c9adc4ab60be.tar.xz mediagoblin-15c3461b1f168b154419ded41498c9adc4ab60be.zip |
Disable cache support of LazyProxy.
Since Babel 1.0, there's a enable_cache keyword argument of LazyProxy,
but we can't pass it directly.
Diffstat (limited to 'mediagoblin')
-rw-r--r-- | mediagoblin/tools/translate.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tools/translate.py b/mediagoblin/tools/translate.py index f8a59aee..5ea73b71 100644 --- a/mediagoblin/tools/translate.py +++ b/mediagoblin/tools/translate.py @@ -53,9 +53,9 @@ class ReallyLazyProxy(LazyProxy): """ Like LazyProxy, except that it doesn't cache the value ;) """ - @property - def value(self): - return self._func(*self._args, **self._kwargs) + def __init__(self, func, *args, **kwargs): + super(ReallyLazyProxy, self).__init__(func, *args, **kwargs) + object.__setattr__(self, '_is_cache_enabled', False) def __repr__(self): return "<%s for %s(%r, %r)>" % ( |