Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fixes for juju-dhx for 2.0rc2 #70
Conversation
chuckbutler
approved these changes
Oct 12, 2016
Aside from my comments about anecdotal reactions, i've pulled this branch and tested its basic functionality on 2.0-rc3.
| @@ -32,11 +34,29 @@ def call(*args): | ||
| sys.exit(e.returncode) | ||
| -JUJU_ENV = call('juju', 'switch').rstrip('\n').split(':')[-1] | ||
| +JUJU_ENV = call('juju', 'switch').rstrip('\n') |
| - annotations = env.get_annotation(machine, 'machine') | ||
| - if annotations['Annotations'].get('import-ids') != ','.join(import_ids): | ||
| + annotations = env.get_annotation(machine, 'machine')['Annotations'] or {} | ||
| + import_ids = ['lp:{}'.format(iid) if ':' not in iid else iid |
chuckbutler
Oct 12, 2016
Contributor
this line makes my head explode.
johnsca
Oct 12, 2016
Member
Yeah, that's a bit of an annoyance when you have to line-break list comprehensions. This might have been marginally clearer using map() instead.
| return get_env._env | ||
| def _unit_errored(unit): | ||
| if JUJU_2: | ||
| - return unit['WorkloadStatus']['Status'] == 'error' |
chuckbutler
merged commit 38bb5eb
into
juju:master
Oct 12, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
johnsca commentedOct 4, 2016
No description provided.