mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated pip_state to work with pip 8.0
Pip 8.0.0 added an InstallationError exception. Updated the state to catch that exception properly.
This commit is contained in:
parent
5c7cc51937
commit
baa274bca9
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,12 @@ if HAS_PIP is True:
|
|||
if 'pip' in sys.modules:
|
||||
del sys.modules['pip']
|
||||
|
||||
pip_ver = tuple(pip.__version__.split('.'))
|
||||
if pip_ver >= (8, 0, 0):
|
||||
from pip.exceptions import InstallationError
|
||||
else:
|
||||
InstallationError = ValueError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Define the module's virtual name
|
||||
|
|
Loading…
Add table
Reference in a new issue