Merge lp:~stub/charm-helpers/bug-1195649-fix-write-file into lp:charm-helpers
Proposed by
Stuart Bishop
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 47 | ||||
Proposed branch: | lp:~stub/charm-helpers/bug-1195649-fix-write-file | ||||
Merge into: | lp:charm-helpers | ||||
Diff against target: |
203 lines (+68/-67) 4 files modified
charmhelpers/contrib/templating/pyformat.py (+13/-0) charmhelpers/core/host.py (+6/-19) tests/contrib/templating/test_pyformat.py (+36/-0) tests/core/test_host.py (+13/-48) |
||||
To merge this branch: | bzr merge lp:~stub/charm-helpers/bug-1195649-fix-write-file | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Wedgwood (community) | Approve | ||
Review via email: mp+173467@code.launchpad.net |
Description of the change
Move implicit rendering out of write_file and into a helper, per Bug #1195634.
To post a comment you must log in.
Stuart,
Thanks for cleaning this up. I agree that template rendering should be a separate concern from writing a file. I'm +1 on this change with one caveat:
As py_render() isn't host-related (nor is the existing render_ template_ file() function), it should live somewhere outside this module. charmhelpers. contrib. template might be appropriate, as most any other template renderers will have external dependencies.
-Matthew