1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-20 20:09:07 +00:00

#267 Compare version_info with a tuple

This commit is contained in:
nvbn 2015-07-07 16:33:41 +03:00
parent 26fc18dfe4
commit fac18de242

View File

@ -2,13 +2,13 @@
import sys
from setuptools import setup, find_packages
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
if sys.version_info < (2, 7):
print(
'thefuck requires Python version 2.7 or later' +
' ({}.{} detected).'.format(*sys.version_info[:2]))
sys.exit(-1)
if sys.version_info[0] == 3 and sys.version_info[1] < 3:
if sys.version_info < (3, 3):
print(
'thefuck requires Python version 3.3 or later' +
' ({}.{} detected).'.format(*sys.version_info[:2]))