Skip to content

Conversation

@ChugR
Copy link
Contributor

@ChugR ChugR commented Feb 2, 2021

On some platforms the result of get_data is 'bytes' not 'str'.

def __init__(self):
"""Load schema."""
qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json').decode('utf8')
Copy link
Contributor

Choose a reason for hiding this comment

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

This is always supposed to produce bytes. Weird that it ever worked on Python 3. https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data.

Copy link
Contributor

Choose a reason for hiding this comment

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

@asfgit asfgit closed this in e78a18a Feb 8, 2021
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