ns1 / nsone-python

NS1 Python SDK
https://nsone.net
MIT License
19 stars 20 forks source link

Updating or adding an answer fails if answer is unicode. #1

Closed rudeb0t closed 9 years ago

rudeb0t commented 9 years ago

Relevant lines here:

https://github.com/nsone/nsone-python/blob/master/nsone/rest/records.py#L34 https://github.com/nsone/nsone-python/blob/master/nsone/rest/records.py#L42

Line 34 above causes code to fail if answer is a unicode string.

Line 42 above causes code to fail if updating from an answer retrieved via loadRecord

Suggestion:

Use basestring instead of str. basestring is the common base class for both str and unicode types.

weyrick commented 9 years ago

Thanks for the note, I'll take care of this!

weyrick commented 9 years ago

commited, thanks.