Force command action to not be executed by the shell unless specifically enabled

This commit is contained in:
James Tanner
2014-03-10 16:11:24 -05:00
committed by James Cammarata
parent 9730157525
commit ba0fec4f42
19 changed files with 427 additions and 245 deletions

View File

@@ -232,7 +232,6 @@ def main():
_ensure_virtualenv(module)
os.chdir(app_path)
cmd = "python manage.py %s" % (command, )
if command in noinput_commands:
@@ -251,7 +250,7 @@ def main():
if module.params[param]:
cmd = '%s %s' % (cmd, module.params[param])
rc, out, err = module.run_command(cmd)
rc, out, err = module.run_command(cmd, cwd=app_path)
if rc != 0:
if command == 'createcachetable' and 'table' in err and 'already exists' in err:
out = 'Already exists.'