Skip to content

Commit

Permalink
pip import fixup for pip10 and pypa/pip#5079
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Mar 18, 2018
1 parent 09a039b commit 61632c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ bin/
include/

.idea/
.pytest_cache/
9 changes: 6 additions & 3 deletions versionfinder/versionfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@
from .versioninfo import VersionInfo

try:
import pip
import pip._internal as pip
except ImportError:
# this is used within try blocks; NBD if they fail
pass
try:
import pip
except (ImportError, KeyError):
# this is used within try blocks; NBD if they fail
pass

try:
import pkg_resources
Expand Down

0 comments on commit 61632c1

Please sign in to comment.