Skip to content
This repository was archived by the owner on Oct 20, 2018. It is now read-only.

Commit 3c67c1b

Browse files
Benjamin Allenthebigmunch
authored andcommitted
Fix undefined variable ('dirname') in MusicManagerWrapper._download [#10]
1 parent b70ab1f commit 3c67c1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gmusicapi_wrapper/musicmanager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ def _download(self, songs, template=None):
169169

170170
metadata = mutagen.File(temp.name, easy=True)
171171
filepath = template_to_filepath(template, metadata) + '.mp3'
172+
dirname = os.path.dirname(filepath)
172173

173-
if os.path.dirname(filepath):
174+
if dirname:
174175
try:
175176
os.makedirs(dirname)
176177
except OSError:

0 commit comments

Comments
 (0)