From 11da526b214f15f78a96b1af7c65884420f7d489 Mon Sep 17 00:00:00 2001 From: "Jeff.JF Lin" Date: Tue, 17 Apr 2018 22:09:04 +0800 Subject: [PATCH] add ImportError --- salt/states/pip_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/pip_state.py b/salt/states/pip_state.py index c6d09f91e3..dbbc2f9396 100644 --- a/salt/states/pip_state.py +++ b/salt/states/pip_state.py @@ -46,7 +46,7 @@ if HAS_PIP is True: # pip 10.0.0 move req module under pip._internal try: from pip._internal.req import InstallRequirement - except: + except ImportError: HAS_PIP = False # Remove references to the loaded pip module above so reloading works import sys