mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
add warning when regex for uri fails
This commit is contained in:
parent
179d3e486c
commit
051e6d49af
@ -11,6 +11,8 @@ Add your changes below.
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Added a warning if the URI regex did not match the input.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|||||||
@ -2140,6 +2140,7 @@ class Spotify:
|
|||||||
|
|
||||||
def _get_uri(self, type, id):
|
def _get_uri(self, type, id):
|
||||||
if self._is_uri(id):
|
if self._is_uri(id):
|
||||||
|
warnings.warn(f"{repr(id)} did not match the Spotify URI RegEx.", UserWarning)
|
||||||
return id
|
return id
|
||||||
else:
|
else:
|
||||||
return "spotify:" + type + ":" + self._get_id(type, id)
|
return "spotify:" + type + ":" + self._get_id(type, id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user