when interacting with the django.command module via the salt api, there are some kwargs that get passed that start with dunders, so we're escaping dunders for now. Maybe there is a better way to do this?

This commit is contained in:
Nick Lang (Salt minion) 2012-04-03 04:59:42 +00:00
parent 4222eb2505
commit 2ebc4a95dd

View File

@ -30,6 +30,7 @@ def command(settings_module,
cmd = "{0} --{1}".format(cmd, arg)
for key, value in kwargs.iteritems():
if not key.startswith("__"):
cmd = '{0} --{1}={2}'.format(cmd, key, value)
return __salt__['cmd.run'](cmd)
@ -110,7 +111,6 @@ def collectstatic(settings_module,
link=False,
no_default_ignore=False,
pythonpath=None):
da = _get_django_admin(bin_env)
cmd = "{0} collectstatic --settings={1} --noinput".format(
da, settings_module)