Use 'except ... as ...'
This commit is contained in:
parent
89db62bc9e
commit
dd42e5684b
@ -32,8 +32,8 @@ class LocalStoredPlaylistsProvider(base.BaseStoredPlaylistsProvider):
|
||||
for uri in parse_m3u(m3u, settings.LOCAL_MUSIC_PATH):
|
||||
try:
|
||||
tracks.append(self.backend.library.lookup(uri))
|
||||
except LookupError, e:
|
||||
logger.error('Playlist item could not be added: %s', e)
|
||||
except LookupError as ex:
|
||||
logger.error('Playlist item could not be added: %s', ex)
|
||||
playlist = Playlist(tracks=tracks, name=name)
|
||||
|
||||
# FIXME playlist name needs better handling
|
||||
|
||||
Loading…
Reference in New Issue
Block a user