Merge lp:~mew/charms/precise/postgresql/volume-map-leniency into lp:charms/postgresql

Proposed by Matthew Wedgwood
Status: Merged
Approved by: Mark Mims
Approved revision: 59
Merged at revision: 59
Proposed branch: lp:~mew/charms/precise/postgresql/volume-map-leniency
Merge into: lp:charms/postgresql
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/hooks.py (+1/-1)
To merge this branch: bzr merge lp:~mew/charms/precise/postgresql/volume-map-leniency
Reviewer Review Type Date Requested Status
Mark Mims (community) Approve
Review via email: mp+179525@code.launchpad.net

Description of the change

Be more lenient about machine-generated configuration by ignoring whitespace around the volume-map configuration value.

To post a comment you must log in.
Revision history for this message
Mark Mims (mark-mims) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2013-07-15 13:56:09 +0000
3+++ hooks/hooks.py 2013-08-09 19:38:07 +0000
4@@ -116,7 +116,7 @@
5 def volume_get_volid_from_volume_map():
6 volume_map = {}
7 try:
8- volume_map = yaml.load(config_data['volume-map'])
9+ volume_map = yaml.load(config_data['volume-map'].strip())
10 if volume_map:
11 return volume_map.get(os.environ['JUJU_UNIT_NAME'])
12 except ConstructorError as e:

Subscribers

People subscribed via source and target branches