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):
|
||||
text = cache_func(artist, album, title)
|
||||
if text != None:
|
||||
f = open(cache_path, 'w')
|
||||
f.write(text)
|
||||
f.close()
|
||||
try:
|
||||
f = open(cache_path, 'w')
|
||||
f.write(text)
|
||||
f.close()
|
||||
except:
|
||||
pass
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue