Fix error in PushImage

Upstream-commit: 5690562fc855a7e813a7e3cfb3340f60bd626530
Component: engine
This commit is contained in:
shin-
2013-05-01 05:26:52 -07:00
parent 815f14e3c7
commit c11f6a1484

View File

@ -375,7 +375,8 @@ func pushImageRec(graph *Graph, stdout io.Writer, img *Image, registry string, t
if res.StatusCode != 200 {
errBody, err := ioutil.ReadAll(res.Body)
if err != nil {
errBody = []byte(err.Error())
return fmt.Errorf("HTTP code %d while uploading metadata and error when"+
" trying to parse response body: %v", res.StatusCode, err)
}
var jsonBody map[string]string
if err := json.Unmarshal(errBody, &jsonBody); err != nil {