diff options
author | Brian Coca <bcoca@ansible.com> | 2015-03-29 16:14:00 -0400 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2015-03-29 16:14:00 -0400 |
commit | e8f56bb62772838bc063c9c3686132270e4f57a5 (patch) | |
tree | 0be5f65f407b197a82f6c1bc591676b12db49cf7 | |
parent | adfcfa4b5850cbc23b50f241a7cd51c38359df22 (diff) | |
parent | afd0b3fcaa4ada3b65a97177c974f462a3b81edf (diff) | |
download | ansible-modules-core-e8f56bb62772838bc063c9c3686132270e4f57a5.tar.gz |
Merge pull request #1027 from apollo13/patch-1
Added os.path.expanduser when searching for pip executable.
-rw-r--r-- | packaging/language/pip.py | 1 | ||||
-rw-r--r-- | web_infrastructure/django_manage.py | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/packaging/language/pip.py b/packaging/language/pip.py index d9ecc17a..a0c70c1a 100644 --- a/packaging/language/pip.py +++ b/packaging/language/pip.py @@ -179,6 +179,7 @@ def _get_pip(module, env=None, executable=None): candidate_pip_basenames = ['pip', 'python-pip', 'pip-python'] pip = None if executable is not None: + executable = os.path.expanduser(executable) if os.path.isabs(executable): pip = executable else: diff --git a/web_infrastructure/django_manage.py b/web_infrastructure/django_manage.py index 3e34a638..46ebb2fb 100644 --- a/web_infrastructure/django_manage.py +++ b/web_infrastructure/django_manage.py @@ -232,8 +232,6 @@ def main(): if not module.params[param]: module.fail_json(msg='%s param is required for command=%s' % (param, command)) - venv = module.params['virtualenv'] - _ensure_virtualenv(module) cmd = "python manage.py %s" % (command, ) @@ -254,7 +252,7 @@ def main(): if module.params[param]: cmd = '%s %s' % (cmd, module.params[param]) - rc, out, err = module.run_command(cmd, cwd=app_path) + rc, out, err = module.run_command(cmd, cwd=os.path.expanduser(app_path)) if rc != 0: if command == 'createcachetable' and 'table' in err and 'already exists' in err: out = 'Already exists.' |