mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Fix bug where formatted arguments are passed to self._warn, which only accepts a single string
This commit is contained in:
parent
e44bd7a936
commit
f8a6e4edb6
@ -1081,15 +1081,15 @@ class Spotify(object):
|
|||||||
fields = id.split(':')
|
fields = id.split(':')
|
||||||
if len(fields) >= 3:
|
if len(fields) >= 3:
|
||||||
if type != fields[-2]:
|
if type != fields[-2]:
|
||||||
self._warn('expected id of type %s but found type %s %s',
|
self._warn('expected id of type %s but found type %s %s' %
|
||||||
type, fields[-2], id)
|
(type, fields[-2], id))
|
||||||
return fields[-1]
|
return fields[-1]
|
||||||
fields = id.split('/')
|
fields = id.split('/')
|
||||||
if len(fields) >= 3:
|
if len(fields) >= 3:
|
||||||
itype = fields[-2]
|
itype = fields[-2]
|
||||||
if type != itype:
|
if type != itype:
|
||||||
self._warn('expected id of type %s but found type %s %s',
|
self._warn('expected id of type %s but found type %s %s' %
|
||||||
type, itype, id)
|
(type, itype, id))
|
||||||
return fields[-1]
|
return fields[-1]
|
||||||
return id
|
return id
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user