Merge lp:~smoser/juju-deployer/options-is-none into lp:juju-deployer

Proposed by Scott Moser
Status: Merged
Approved by: Kapil Thangavelu
Approved revision: 137
Merged at revision: 138
Proposed branch: lp:~smoser/juju-deployer/options-is-none
Merge into: lp:juju-deployer
Diff against target: 12 lines (+1/-1)
1 file modified
deployer/deployment.py (+1/-1)
To merge this branch: bzr merge lp:~smoser/juju-deployer/options-is-none
Reviewer Review Type Date Requested Status
Kapil Thangavelu Approve
Review via email: mp+248973@code.launchpad.net

Commit message

do not fail if charms 'options' is None

This covers the case where user's yaml looks something like:

basic:
 series: trusty
 services:
   foo:
     branch: lp:charms/trusty/foo
     options:
     num_units: 1
     ...

To post a comment you must log in.
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployer/deployment.py'
2--- deployer/deployment.py 2014-08-26 22:34:07 +0000
3+++ deployer/deployment.py 2015-02-06 21:47:43 +0000
4@@ -161,7 +161,7 @@
5 for svc_name, svc_data in self.data['services'].items():
6 charm = self.get_charm_for(svc_name)
7 if k in charm.config:
8- if 'options' not in svc_data:
9+ if not svc_data.get('options'):
10 svc_data['options'] = {}
11 svc_data['options'][k] = v
12 found = True

Subscribers

People subscribed via source and target branches