Re-enabled CmdPull progress bar code which had been temporarily disabled

This commit is contained in:
Solomon Hykes 2013-02-28 16:30:31 -08:00
parent 2192d3371c
commit 5675439b91
1 changed files with 15 additions and 15 deletions

View File

@ -11,7 +11,7 @@ import (
"github.com/dotcloud/docker/image" "github.com/dotcloud/docker/image"
"github.com/dotcloud/docker/rcli" "github.com/dotcloud/docker/rcli"
"io" "io"
// "net/http" "net/http"
"net/url" "net/url"
"os" "os"
"path" "path"
@ -393,20 +393,20 @@ func (srv *Server) CmdPull(stdin io.ReadCloser, stdout io.Writer, args ...string
fmt.Fprintf(stdout, "Downloading from %s\n", u.String()) fmt.Fprintf(stdout, "Downloading from %s\n", u.String())
// Download with curl (pretty progress bar) // Download with curl (pretty progress bar)
// If curl is not available, fallback to http.Get() // If curl is not available, fallback to http.Get()
// archive, err := future.Curl(u.String(), stdout) archive, err := future.Curl(u.String(), stdout)
// if err != nil { if err != nil {
// if resp, err := http.Get(u.String()); err != nil { if resp, err := http.Get(u.String()); err != nil {
// return err return err
// } else { } else {
// archive = resp.Body archive = resp.Body
// } }
// } }
// fmt.Fprintf(stdout, "Unpacking to %s\n", name) fmt.Fprintf(stdout, "Unpacking to %s\n", name)
// img, err := srv.images.Import(name, archive, nil) img, err := srv.images.Import(name, archive, nil)
// if err != nil { if err != nil {
// return err return err
// } }
// fmt.Fprintln(stdout, img.Id) fmt.Fprintln(stdout, img.Id)
return nil return nil
} }