aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Element.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-27 14:43:24 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-27 14:43:24 +0000
commitbcbd5801c2be23b2ee1a22e7b088fc2fb654f1c9 (patch)
tree14a12d4baa5d72542cf2e8ffbef249634dc8b89f /lib/python/Components/Element.py
parent8b921858d57c9d4cd5ff0ec40a484a4231762974 (diff)
downloadenigma2-bcbd5801c2be23b2ee1a22e7b088fc2fb654f1c9.tar.gz
enigma2-bcbd5801c2be23b2ee1a22e7b088fc2fb654f1c9.zip
some cleanups,
add missing destroy calls, fix incomplete destroy calls, small speedup
Diffstat (limited to 'lib/python/Components/Element.py')
-rw-r--r--lib/python/Components/Element.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/python/Components/Element.py b/lib/python/Components/Element.py
index 437d934b..2af57793 100644
--- a/lib/python/Components/Element.py
+++ b/lib/python/Components/Element.py
@@ -8,11 +8,12 @@ from Tools.CList import CList
def cached(f):
name = f.__name__
def wrapper(self):
- if self.cache is None:
+ cache = self.cache
+ if cache is None:
return f(self)
- if name not in self.cache:
- self.cache[name] = (True, f(self))
- return self.cache[name][1]
+ if name not in cache:
+ cache[name] = (True, f(self))
+ return cache[name][1]
return wrapper
class Element(object):