From a925a075a65988a6adabc4609f22bf410f483c20 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Sun, 29 Mar 2015 21:34:29 +0200 Subject: [PATCH] Added os.path.expanduser to app_path in django_manage --- lib/ansible/modules/web_infrastructure/django_manage.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/modules/web_infrastructure/django_manage.py b/lib/ansible/modules/web_infrastructure/django_manage.py index 3e34a6388c0..46ebb2fb8f1 100644 --- a/lib/ansible/modules/web_infrastructure/django_manage.py +++ b/lib/ansible/modules/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.'