From 6261eae0e2dc0968aec6f98f8fe983bde997a57b Mon Sep 17 00:00:00 2001 From: Paul Lamere Date: Sun, 22 Jan 2017 07:52:00 -0500 Subject: [PATCH] Fixed warn to work with varargs --- spotipy/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spotipy/client.py b/spotipy/client.py index 6f5dae7..a45d4d3 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -211,9 +211,12 @@ class Spotify(object): else: return None - def _warn(self, msg): + def _warn_old(self, msg): print('warning:' + msg, file=sys.stderr) + def _warn(self, msg, *args): + print('warning:' + msg.format(*args), file=sys.stderr) + def track(self, track_id): ''' returns a single track given the track's ID, URI or URL