From abbf9798b4f417ca23698beb76b98bcdb4412dfa Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 15 Jun 2013 11:27:09 -0700 Subject: [PATCH] packer/rpc: Panic in error case --- packer/rpc/environment.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packer/rpc/environment.go b/packer/rpc/environment.go index 1bf44dc16..aeb468059 100644 --- a/packer/rpc/environment.go +++ b/packer/rpc/environment.go @@ -93,8 +93,11 @@ func (e *Environment) Ui() packer.Ui { var reply string e.client.Call("Environment.Ui", new(interface{}), &reply) - // TODO: error handling - client, _ := rpc.Dial("tcp", reply) + client, err := rpc.Dial("tcp", reply) + if err != nil { + panic(err) + } + return &Ui{client} }