return -> raise
This commit is contained in:
parent
93653f33ec
commit
3e09556e11
|
|
@ -58,7 +58,7 @@ class Client:
|
||||||
spotify_id = result.group("id")
|
spotify_id = result.group("id")
|
||||||
|
|
||||||
if not result:
|
if not result:
|
||||||
return InvalidSpotifyURL("The Spotify link provided is not valid.")
|
raise InvalidSpotifyURL("The Spotify link provided is not valid.")
|
||||||
|
|
||||||
request_url = REQUEST_URL.format(type=spotify_type, id=spotify_id)
|
request_url = REQUEST_URL.format(type=spotify_type, id=spotify_id)
|
||||||
|
|
||||||
|
|
@ -90,4 +90,4 @@ class Client:
|
||||||
tracks += [Track(track["track"]) for track in next_data["items"]]
|
tracks += [Track(track["track"]) for track in next_data["items"]]
|
||||||
next_page_url = next_data["next"]
|
next_page_url = next_data["next"]
|
||||||
|
|
||||||
return Playlist(data, tracks)
|
return Playlist(data, tracks)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue