make client side know container removal in progress

Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9a58f298d182945eb2b820e5e3539b754fdaa751
Component: engine
This commit is contained in:
allencloud
2016-08-27 21:39:34 +08:00
parent 67175b8b48
commit 672761b64e
4 changed files with 8 additions and 10 deletions

View File

@ -6,7 +6,6 @@ import (
"io"
"net/http"
"strconv"
"strings"
"syscall"
"time"
@ -386,10 +385,6 @@ func (s *containerRouter) deleteContainers(ctx context.Context, w http.ResponseW
}
if err := s.backend.ContainerRm(name, config); err != nil {
// Force a 404 for the empty string
if strings.Contains(strings.ToLower(err.Error()), "prefix can't be empty") {
return fmt.Errorf("no such container: \"\"")
}
return err
}