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
1=== modified file 'charmhelpers/contrib/openstack/context.py'
2--- charmhelpers/contrib/openstack/context.py 2015-10-07 10:57:11 +0000
3+++ charmhelpers/contrib/openstack/context.py 2015-10-07 21:54:05 +0000
4@@ -1120,7 +1120,7 @@
5
6 ctxt = {
7 ... other context ...
8- 'subordinate_config': {
9+ 'subordinate_configuration': {
10 'DEFAULT': {
11 'key1': 'value1',
12 },
13@@ -1161,22 +1161,23 @@
14 try:
15 sub_config = json.loads(sub_config)
16 except:
17- log('Could not parse JSON from subordinate_config '
18- 'setting from %s' % rid, level=ERROR)
19+ log('Could not parse JSON from '
20+ 'subordinate_configuration setting from %s'
21+ % rid, level=ERROR)
22 continue
23
24 for service in self.services:
25 if service not in sub_config:
26- log('Found subordinate_config on %s but it contained'
27- 'nothing for %s service' % (rid, service),
28- level=INFO)
29+ log('Found subordinate_configuration on %s but it '
30+ 'contained nothing for %s service'
31+ % (rid, service), level=INFO)
32 continue
33
34 sub_config = sub_config[service]
35 if self.config_file not in sub_config:
36- log('Found subordinate_config on %s but it contained'
37- 'nothing for %s' % (rid, self.config_file),
38- level=INFO)
39+ log('Found subordinate_configuration on %s but it '
40+ 'contained nothing for %s'
41+ % (rid, self.config_file), level=INFO)
42 continue
43
44 sub_config = sub_config[self.config_file]

Subscribers

People subscribed via source and target branches