aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2019-12-04 02:26:59 +0000
committerrexlee8776 <limingjiang@huawei.com>2019-12-04 03:16:31 +0000
commitfa7302c8d77f2400ac11874354de68ea632717ed (patch)
treef19f45c4433f424c120f0ce4d4df91be86e050db
parent34a54021b4cfee0c853be46ee1cba5211d8dafdb (diff)
[bugfix] functional_py3 failed in ci gating
import pip._internal.main and use correctly JIRA: YARDSTICK-1627 Change-Id: I3613c651e474474329f55adda5b54ce5bf4fd9ca Signed-off-by: rexlee8776 <limingjiang@huawei.com>
-rw-r--r--yardstick/common/packages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/common/packages.py b/yardstick/common/packages.py
index a128b7428..c65eab2ba 100644
--- a/yardstick/common/packages.py
+++ b/yardstick/common/packages.py
@@ -15,7 +15,7 @@
import logging
import re
-import pip
+from pip._internal.main import main
from pip._internal import exceptions as pip_exceptions
from pip._internal.operations import freeze
@@ -36,7 +36,7 @@ def _pip_main(package, action, target=None):
cmd = [action, package, '--upgrade']
if target:
cmd.append('--target=%s' % target)
- return pip._internal.main(cmd)
+ return main(cmd)
def _pip_execute_action(package, action=ACTION_INSTALL, target=None):