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
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2013-07-15 13:56:09 +0000
+++ hooks/hooks.py 2013-08-09 19:38:07 +0000
@@ -116,7 +116,7 @@
116def volume_get_volid_from_volume_map():116def volume_get_volid_from_volume_map():
117 volume_map = {}117 volume_map = {}
118 try:118 try:
119 volume_map = yaml.load(config_data['volume-map'])119 volume_map = yaml.load(config_data['volume-map'].strip())
120 if volume_map:120 if volume_map:
121 return volume_map.get(os.environ['JUJU_UNIT_NAME'])121 return volume_map.get(os.environ['JUJU_UNIT_NAME'])
122 except ConstructorError as e:122 except ConstructorError as e:

Subscribers

People subscribed via source and target branches