libsaria: Catch errors when writing cache files
The user doesn't want to see these...
This commit is contained in:
parent
34c7bc374e
commit
868359a4a4
|
@ -27,9 +27,12 @@ def make_cache_path(artist, album, file):
|
||||||
def fill_cache(artist, album, title, cache_func, cache_path):
|
def fill_cache(artist, album, title, cache_func, cache_path):
|
||||||
text = cache_func(artist, album, title)
|
text = cache_func(artist, album, title)
|
||||||
if text != None:
|
if text != None:
|
||||||
f = open(cache_path, 'w')
|
try:
|
||||||
f.write(text)
|
f = open(cache_path, 'w')
|
||||||
f.close()
|
f.write(text)
|
||||||
|
f.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue