Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimiter Naydenov committed Oct 25, 2016
1 parent dc7eda5 commit 2c4215a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ endif
# Install bash_completion
install-etc:
@echo Installing bash completion
@sudo install -o root -g root -m 644 etc/bash_completion.d/juju-2.0 /etc/bash_completion.d
@sudo install -o root -g root -m 644 etc/bash_completion.d/juju-version /etc/bash_completion.d
@sudo install -o root -g root -m 644 etc/bash_completion.d/juju-2.0 /usr/share/bash-completion/completions
@sudo install -o root -g root -m 644 etc/bash_completion.d/juju-version /usr/share/bash-completion/completions

setup-lxd:
ifeq ($(shell ifconfig lxdbr0 2>&1 | grep -q "inet addr" && echo true),true)
Expand Down
12 changes: 4 additions & 8 deletions etc/bash_completion.d/juju-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ import json, sys
sys.stderr.close()
j = json.load(sys.stdin)
all_units = []
try:
for k, v in j.get("applications", {}).items():
all_units.extend(v.get("units", {}).keys())
print ("\n".join([unit + trail for unit in all_units]))
except: pass
for k, v in j.get("applications", {}).items():
all_units.extend(v.get("units", {}).keys())
print ("\n".join([unit + trail for unit in all_units]))
' < ${cache_fname}
}

Expand All @@ -58,9 +56,7 @@ _juju_2_0_applications_from_status() {
import json, sys
sys.stderr.close()
j = json.load(sys.stdin)
try:
print ("\n".join(j.get("applications", {}).keys()))
except: pass
print ("\n".join(j.get("applications", {}).keys()))
' < ${cache_fname}
}

Expand Down

0 comments on commit 2c4215a

Please sign in to comment.