1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-13 22:28:33 +00:00

Keep working if pip isn't installed

This might be installed by invoking setup.py directly.
This commit is contained in:
Tim D. Smith 2016-06-28 21:50:06 -07:00 committed by GitHub
parent 99e828d15d
commit a7d1c725e4

View File

@ -4,10 +4,13 @@ import pkg_resources
import sys
import os
if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6:
print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
' pip install -U pip')
sys.exit(-1)
try:
if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6:
print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
' pip install -U pip')
sys.exit(-1)
except pkg_resources.DistributionNotFound:
pass
if os.environ.get('CONVERT_README'):
import pypandoc