mozilla-services/circus — pull request #554 by jsbronder (2013-09-28 22:30:11+00:00)
Title: config:  expand variables in dictionaries

Previous behavior would expand variables only for strings in the first
level of the watcher configuration. However, this left unexpanded
variables in any dictionaries within the watcher configuration. For
example, the stream configuration. Change to descending into
dictionaries and expanding any string values.

Tested with the following configuration. Without this change applied,
we get the error
IOError: [Errno 2] No such file or directory: '$(circus.env.LOGDIR)/echo.log'
whereas with the change, the log show up as intended at /tmp/echo.log

[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556

[watcher:echo]
cmd = echo
args = hi

stdout_stream.class = FileStream
stdout_stream.filename = $(circus.env.LOGDIR)/echo.log
stdout_stream.max_bytes = 10485760

[env:*]
LOGDIR = /tmp