corrected a bug in LastfmBase.cachedProperty

master
Abhinav Sarkar 2008-08-25 13:46:18 +00:00
parent 3bb7aca74f
commit 0b4e8f539d
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,8 @@ class LastfmBase(object):
def wrapper(ob):
cacheAttribute = getattr(ob, attributeName, None)
if cacheAttribute is None:
setattr(ob, attributeName, func(ob))
cacheAttribute = func(ob)
setattr(ob, attributeName, cacheAttribute)
return cacheAttribute
return property(fget = wrapper, doc = func.__doc__)

View File

@ -533,7 +533,6 @@ from tag import Tag
from track import Track
#TODO
#extract self.__* property as decorator
#write depaginations
#write exceptions
#argument type checking