From 15c3461b1f168b154419ded41498c9adc4ab60be Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 28 Jul 2014 15:24:49 +0300 Subject: [PATCH] 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. --- mediagoblin/tools/translate.py | 6 +++--- 1 file 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)>" % (