mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-10 04:02:17 +00:00
Used Python2-friendly syntax in creating new directories
This commit is contained in:
parent
a2add86550
commit
00b043dda6
@ -146,7 +146,8 @@ def cover_art():
|
|||||||
if not art:
|
if not art:
|
||||||
raise NotFound('Cover art')
|
raise NotFound('Cover art')
|
||||||
#Art found, save to cache
|
#Art found, save to cache
|
||||||
os.makedirs(embed_cache, exist_ok=True)
|
if not os.path.exists(embed_cache):
|
||||||
|
os.makedirs(embed_cache)
|
||||||
with open(cover_path, 'wb') as cover_file:
|
with open(cover_path, 'wb') as cover_file:
|
||||||
cover_file.write(art)
|
cover_file.write(art)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user