Merge lp:~freyes/charm-helpers/lp1503891 into lp:charm-helpers

Proposed by Felipe Reyes
Status: Merged
Merged at revision: 462
Proposed branch: lp:~freyes/charm-helpers/lp1503891
Merge into: lp:charm-helpers
Diff against target: 44 lines (+10/-9)
1 file modified
charmhelpers/contrib/openstack/context.py (+10/-9)
To merge this branch: bzr merge lp:~freyes/charm-helpers/lp1503891
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Approve
Review via email: mp+273759@code.launchpad.net

Description of the change

This patch makes the documentation and log messages consistent with what the code actually does.

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/openstack/context.py'
--- charmhelpers/contrib/openstack/context.py 2015-10-07 10:57:11 +0000
+++ charmhelpers/contrib/openstack/context.py 2015-10-07 21:54:05 +0000
@@ -1120,7 +1120,7 @@
11201120
1121 ctxt = {1121 ctxt = {
1122 ... other context ...1122 ... other context ...
1123 'subordinate_config': {1123 'subordinate_configuration': {
1124 'DEFAULT': {1124 'DEFAULT': {
1125 'key1': 'value1',1125 'key1': 'value1',
1126 },1126 },
@@ -1161,22 +1161,23 @@
1161 try:1161 try:
1162 sub_config = json.loads(sub_config)1162 sub_config = json.loads(sub_config)
1163 except:1163 except:
1164 log('Could not parse JSON from subordinate_config '1164 log('Could not parse JSON from '
1165 'setting from %s' % rid, level=ERROR)1165 'subordinate_configuration setting from %s'
1166 % rid, level=ERROR)
1166 continue1167 continue
11671168
1168 for service in self.services:1169 for service in self.services:
1169 if service not in sub_config:1170 if service not in sub_config:
1170 log('Found subordinate_config on %s but it contained'1171 log('Found subordinate_configuration on %s but it '
1171 'nothing for %s service' % (rid, service),1172 'contained nothing for %s service'
1172 level=INFO)1173 % (rid, service), level=INFO)
1173 continue1174 continue
11741175
1175 sub_config = sub_config[service]1176 sub_config = sub_config[service]
1176 if self.config_file not in sub_config:1177 if self.config_file not in sub_config:
1177 log('Found subordinate_config on %s but it contained'1178 log('Found subordinate_configuration on %s but it '
1178 'nothing for %s' % (rid, self.config_file),1179 'contained nothing for %s'
1179 level=INFO)1180 % (rid, self.config_file), level=INFO)
1180 continue1181 continue
11811182
1182 sub_config = sub_config[self.config_file]1183 sub_config = sub_config[self.config_file]

Subscribers

People subscribed via source and target branches