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

Fixed incorrect description type #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

A-UNDERSCORE-D
Copy link

Newer MineCraft severs respond with a different format for the description than what was originally expected, added a check for the old format and new formats, and throws an error otherwise

self.description_clean = re.sub(r'\u00A7.', '', raw["description"])
# for newer versions of minecraft

if type(raw["description"]) is str:

Choose a reason for hiding this comment

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

Switching to isinstance() checks may be better, and using string_types instead of str would be more version compatible

Choose a reason for hiding this comment

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

Should also fix the build errors

@daboross
Copy link

daboross commented May 18, 2017

Even though supporting the full format (http://wiki.vg/Chat) would be best, this is definitely a step up from nothing for 1.9 at all.

I'll give my vote for pulling this in, thank you for making this!

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.

3 participants