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

Fix pyminifier on Python 2.6 by always checking that sys.version_info is not a tuple #39

Merged
merged 1 commit into from
Jun 25, 2015

Conversation

MoshiBin
Copy link
Contributor

@MoshiBin MoshiBin commented Apr 2, 2015

In Python 2.6, sys.version_info is a tuple. Version 2.7 changed it to a named tuple that has the .major key. However, checking for .major breaks compatibility with 2.6.

This PR adds checks to verify that sys.version_info is indeed not a tuple before checking its .major attribute. If it's a tuple, it's guaranteed to be <3. This is the same check that got added in this commit.

liftoff added a commit that referenced this pull request Jun 25, 2015
Fix pyminifier on Python 2.6 by always checking that sys.version_info is not a tuple
@liftoff liftoff merged commit 3a0beb5 into liftoff:master Jun 25, 2015
@liftoff
Copy link
Owner

liftoff commented Jun 25, 2015

Thanks! I honestly don't care about Python 2.6 very much but I'll gladly accept PRs to fix any issues.

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