Skip to content

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