Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
upgrade pip and new pip deps
Browse files Browse the repository at this point in the history
  • Loading branch information
quasiben committed Feb 3, 2017
1 parent 264f9f2 commit 2f85b02
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dask_ec2/salt.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ def __install_python_pip():
raise DaskEc2Exception("%s\nCouldn't install python-pip. Error is above (maybe try again)" %
e.last_exception)

@retry(retries=3, wait=0)
def __upgrade_pip():
cmd = "pip install --upgrade pip packaging appdirs six"
ret = master.exec_command(cmd, sudo=True)
if ret["exit_code"] != 0:
raise Exception(ret["stderr"])

try:
__upgrade_pip()
except RetriesExceededException as e:
raise DaskEc2Exception(
"%s\nCouldn't upgrade pip. Error is above (maybe try again)" %
e.last_exception)

@retry(retries=3, wait=0)
def __install_salt_rest_api():
cmd = "pip install cherrypy"
Expand Down

0 comments on commit 2f85b02

Please sign in to comment.