do not error with no active host for ls

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2015-02-23 14:54:31 -05:00
parent 13b66e7956
commit 779118147e
No known key found for this signature in database
GPG Key ID: A519480096146526
1 changed files with 0 additions and 9 deletions

View File

@ -395,11 +395,6 @@ func cmdLs(c *cli.Context) {
for _, host := range hostList { for _, host := range hostList {
if !quiet { if !quiet {
tmpHost, err := store.GetActive()
if err != nil {
log.Errorf("There's a problem with the active host: %s", err)
}
if host.SwarmMaster { if host.SwarmMaster {
swarmMasters[host.SwarmDiscovery] = host.Name swarmMasters[host.SwarmDiscovery] = host.Name
} }
@ -408,10 +403,6 @@ func cmdLs(c *cli.Context) {
swarmInfo[host.Name] = host.SwarmDiscovery swarmInfo[host.Name] = host.SwarmDiscovery
} }
if tmpHost == nil {
log.Errorf("There's a problem finding the active host")
}
go getHostState(host, *store, hostListItems) go getHostState(host, *store, hostListItems)
} else { } else {
fmt.Fprintf(w, "%s\n", host.Name) fmt.Fprintf(w, "%s\n", host.Name)