From 8887ca2fedfbfec65d9580cc7cba9530788a7099 Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Wed, 6 May 2015 17:52:29 -0700 Subject: [PATCH] Fix formatting and non-returning of error Signed-off-by: Nathan LeClaire --- commands/commands.go | 3 +++ utils/utils.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/commands.go b/commands/commands.go index c912aebcd0..b3b1762408 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -543,6 +543,9 @@ func getMachineConfig(c *cli.Context) (*machineConfig, error) { } m, err := mcn.Get(name) + if err != nil { + return nil, err + } machineDir := filepath.Join(utils.GetMachineDir(), m.Name) caCert := filepath.Join(machineDir, "ca.pem") diff --git a/utils/utils.go b/utils/utils.go index 0efb810dcb..d2d0483b22 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -112,7 +112,7 @@ func WaitForDocker(ip string, daemonPort int) error { return WaitFor(func() bool { conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", ip, daemonPort)) if err != nil { - log.Debugf("Daemon not responding yet: ", err) + log.Debugf("Daemon not responding yet: %s", err) return false } conn.Close()