Fix "weave ps" output when weave is not running

The #2418 has changed a behaviour of "weave ps" which outputs
"Link not found" in the case of weave not running. The previous
behaviour was to output an empty line.
This commit is contained in:
Martynas Pumputis committed 2016-07-14 15:15:14 +01:00
1 parent acdd739deb
commit fd0a7efa23
2 files changed
+11

No files matched your search

+5
View File
@@ -5,7 +5,9 @@ import (
"github.com/fsouza/go-dockerclient"
"github.com/vishvananda/netlink"
"github.com/weaveworks/weave/common"
weavenet "github.com/weaveworks/weave/net"
)
func containerAddrs(args []string) error {
@@ -21,6 +23,9 @@ func containerAddrs(args []string) error {
pred, err := common.ConnectedToBridgePredicate(bridgeName)
if err != nil {
if err == weavenet.ErrLinkNotFound {
return nil
}
return err
}