Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable CLI pretty printing #129

Merged
merged 1 commit into from May 23, 2019
Merged

Conversation

konvulse
Copy link
Contributor

@konvulse konvulse commented May 23, 2019

I thought from builtin import str was suppose to take care of this, but I guess it doesn't. I was getting type === str but isinstance(x,str) did not work. Stackoverflow suggested in the fix implemented here which works for python 2 and 3.

Also result.content was bytes not str in Python 3 so this fix includes decoding the response content.

Also refactored pretty printing into a reusable function.

@embrenneke embrenneke merged commit dc8a645 into master May 23, 2019
@embrenneke embrenneke deleted the bugfix/cli-print-response branch May 23, 2019 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants