libsaria: Change cache_func() argument order

I want to pass the file object last, I just think it looks better.
This commit is contained in:
Bryan Schumaker 2011-05-07 15:49:08 -04:00
parent 797063c492
commit 0f1b5550aa
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class LastFmRequest(dict):
else:
return None
def lfm_cache_album(file, artist, album, title):
def lfm_cache_album(artist, album, title, file):
req = LastFmRequest("album.getInfo")
req["album"] = album
req["artist"] = artist

View File

@ -22,9 +22,9 @@ def make_cache_path(artist, album, file):
os.makedirs(cache_path)
return join(cache_path, file)
def read_cache(artist, album, title, cache_func, cache_path):
def fill_cache(artist, album, title, cache_func, cache_path):
f = open(cache_path, 'w')
cache_func(f, artist, album, title)
cache_func(artist, album, title, f)
f.close()
if not file_exists(cache_path):
os.remove(cache_path)