Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(692)

Unified Diff: cmd/juju/status.go

Issue 6488077: juju: always connect to State.
Patch Set: juju: always connect to State. Created 12 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cmd/juju/expose.go ('k') | cmd/juju/unexpose.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/juju/status.go
=== modified file 'cmd/juju/status.go'
--- cmd/juju/status.go 2012-08-21 14:53:13 +0000
+++ cmd/juju/status.go 2012-09-03 17:35:44 +0000
@@ -37,7 +37,7 @@
}
func (c *StatusCommand) Run(ctx *cmd.Context) error {
- conn, err := juju.NewConn(c.EnvName)
+ conn, err := juju.NewConnFromName(c.EnvName)
if err != nil {
return err
}
@@ -48,17 +48,12 @@
return err
}
- state, err := conn.State()
- if err != nil {
- return err
- }
-
- machines, err := fetchAllMachines(state)
- if err != nil {
- return err
- }
-
- services, err := fetchAllServices(state)
+ machines, err := fetchAllMachines(conn.State)
+ if err != nil {
+ return err
+ }
+
+ services, err := fetchAllServices(conn.State)
if err != nil {
return err
}
« no previous file with comments | « cmd/juju/expose.go ('k') | cmd/juju/unexpose.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b