Better magic for write_file

Bug #1195634 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
Medium
Stuart Bishop

Bug Description

Currently, write_file implicitly runs format in the path and the file contents. This can be useful, but can also cause great pain if the contents contains curly braces, common in many of the files we need to store like Perl or JSON or Ruby.

I propose moving the implicit format out of this helper (and others for consistency), and switching to the following syntax:

write_file(EnvFormat(path), EnvFormat(contents, foo=bar))

Related branches

Stuart Bishop (stub)
Changed in charm-helpers:
status: New → In Progress
assignee: nobody → Stuart Bishop (stub)
Matthew Wedgwood (mew)
Changed in charm-helpers:
importance: Undecided → Medium
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.