Merge pull request #145 from carlosedp/patch-1

Update function to make it compatible to Python 3.
This commit is contained in:
Paul Lamere 2017-01-04 14:32:21 -05:00 committed by GitHub
commit 8f3afec197
1 changed files with 5 additions and 0 deletions

View File

@ -418,6 +418,11 @@ class Spotify(object):
- collaborative - optional is the playlist collaborative
'''
data = {}
# Add Python2 and Python3 compatibility checking string types
try:
basestring
except NameError:
basestring = str
if isinstance(name, basestring):
data['name'] = name
if isinstance(public, bool):