git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make menu text translatable
[enigma2.git]
/
lib
/
python
/
Components
/
Element.py
diff --git
a/lib/python/Components/Element.py
b/lib/python/Components/Element.py
index 437d934bb507529969571bdeaa487c1503dc825e..2af5779351b6f192a233ca455a6b63a66995c3d0 100644
(file)
--- 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):
def cached(f):
name = f.__name__
def wrapper(self):
- if self.cache is None:
+ cache = self.cache
+ if cache is None:
return f(self)
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):
return wrapper
class Element(object):