mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
plugins/traffic-control: fix output for getStatus()
If `tc qdisc show dev eth0` returns an error, then output is set to empty string.
This commit is contained in:
@@ -162,7 +162,7 @@ func getStatus(pid int) (*TrafficControlStatus, error) {
|
||||
cmdOut, err := exec.Command(cmd[0], cmd[1:]...).CombinedOutput()
|
||||
if err != nil {
|
||||
log.Error(string(cmdOut))
|
||||
output = "-"
|
||||
output = ""
|
||||
return fmt.Errorf("failed to execute command: tc qdisc show dev eth0: %v", err)
|
||||
}
|
||||
output = string(cmdOut)
|
||||
|
||||
Reference in New Issue
Block a user