added internet connection check before updating pip packages
Change-Id: Ie9010f447cf3512fa125afda10596ba844ab3b7c
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index 074e789..caa3f3f 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -29,7 +29,7 @@
common.infoMsg("[Python ${path}] Setup ${python} environment")
sh(returnStdout: true, script: virtualenv_cmd)
try {
- runVirtualenvCommand(path, "pip install -U setuptools pip")
+ runVirtualenvCommand(path, "wget -q -T 3 --spider http://google.com && pip install -U setuptools pip")
} catch(Exception e) {
common.warningMsg("Setuptools and pip cannot be updated, you might be offline")
}