From 00b043dda6ef840818e3030400bb5cbe2e9445ce Mon Sep 17 00:00:00 2001 From: Taizo Simpson Date: Mon, 8 Oct 2018 21:21:26 -0400 Subject: [PATCH] Used Python2-friendly syntax in creating new directories --- supysonic/api/media.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supysonic/api/media.py b/supysonic/api/media.py index ddbc226..033895b 100644 --- a/supysonic/api/media.py +++ b/supysonic/api/media.py @@ -146,7 +146,8 @@ def cover_art(): if not art: raise NotFound('Cover art') #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: cover_file.write(art) else: