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

Convert 'content' from byte to string if necessary #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atengler
Copy link

@atengler atengler commented Oct 8, 2018

In python3 content variable contains byte and GERRIT_MAGIC_JSON_PREFIX contains string, so the current code raises on line 47 (former), this simple check should fix the issue

Copy link
Collaborator

@dpursehouse dpursehouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're using REST, please consider using pygerrit2 instead.

@@ -42,6 +42,8 @@ def _decode_response(response):

"""
content = response.content.strip()
if not isinstance(content, str):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants