mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03: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 a warning if the URI regex did not match the input.
|
||||
|
||||
### Fixed
|
||||
|
||||
### Removed
|
||||
|
||||
@ -2140,6 +2140,7 @@ class Spotify:
|
||||
|
||||
def _get_uri(self, type, id):
|
||||
if self._is_uri(id):
|
||||
warnings.warn(f"{repr(id)} did not match the Spotify URI RegEx.", UserWarning)
|
||||
return id
|
||||
else:
|
||||
return "spotify:" + type + ":" + self._get_id(type, id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user