Merge lp:~ev/amulet/fix-no-relations into lp:~vila/amulet/ci

Proposed by Evan
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 54
Merged at revision: 54
Proposed branch: lp:~ev/amulet/fix-no-relations
Merge into: lp:~vila/amulet/ci
Diff against target: 12 lines (+1/-1)
1 file modified
amulet/deployer.py (+1/-1)
To merge this branch: bzr merge lp:~ev/amulet/fix-no-relations
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+200859@code.launchpad.net

Description of the change

If a juju-deployer yaml doesn't have any relations set, amulet breaks.

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Feel free to ask for tests, I just wanted to get this popped off my brain stack.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Yeah, test please ;)

More importantly, we should converge to trunk asap so, let's land this in the mean time.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'amulet/deployer.py'
2--- amulet/deployer.py 2013-12-18 17:18:14 +0000
3+++ amulet/deployer.py 2014-01-08 15:55:08 +0000
4@@ -47,7 +47,7 @@
5 self.series = schema['series']
6 self.relations = []
7
8- for rel in schema['relations']:
9+ for rel in schema.get('relations', []):
10 self.relations.append(rel)
11
12 def add(self, service, charm=None, units=1):

Subscribers

People subscribed via source and target branches

to all changes: