You need an 's' after the closing parenthesis:

environment=USER=%(ENV_FLOWER_USER_NAME)s,PASS=%(ENV_FLOWER_PASSWORD)s
command=/usr/local/opt/python/bin/flower --basic_auth=%(ENV_USER)s:%(ENV_PASS)s

See the python string formatting documentation for more on this:
<https://docs.python.org/release/2.7/library/stdtypes.html#string-formatting-operations>

On Mon, Feb 09, 2015 at 12:20:43PM -0800, Josh Joy wrote:
> Hi,
> 
> I'm trying to use environment variables in my command, though unable to
> run.
> 
> My supervisor configuration file
> 
> environment=USER=%(ENV_FLOWER_USER_NAME),PASS=%(ENV_FLOWER_PASSWORD)
> command=/usr/local/opt/python/bin/flower --basic_auth=%(ENV_USER}:%(ENV_PASS)
> 
> When I start supervisord, I receive the following error
> 
> Restarting supervisor: Error: Format string
> 'USER=%(ENV_FLOWER_USER_NAME),PASS=%(ENV_FLOWER_PASSWORD)' for
> 'environment' is badly formatted
> 
> Any ideas?
> 
> Thanks,
> Josh

> _______________________________________________
> Supervisor-users mailing list
> Supervisor-users@lists.supervisord.org
> https://lists.supervisord.org/mailman/listinfo/supervisor-users

_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to