Inline err assignment

This commit is contained in:
Chris Bednarski 2015-11-17 17:12:45 -08:00
parent a2f4188246
commit b22b5eb3aa
1 changed files with 1 additions and 2 deletions

View File

@ -440,8 +440,7 @@ func (d *DockerDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, er
// Split the handle // Split the handle
pidBytes := []byte(strings.TrimPrefix(handleID, "DOCKER:")) pidBytes := []byte(strings.TrimPrefix(handleID, "DOCKER:"))
pid := &dockerPID{} pid := &dockerPID{}
err := json.Unmarshal(pidBytes, pid) if err := json.Unmarshal(pidBytes, pid); err != nil {
if err != nil {
return nil, fmt.Errorf("Failed to parse handle '%s': %v", handleID, err) return nil, fmt.Errorf("Failed to parse handle '%s': %v", handleID, err)
} }
d.logger.Printf("[INFO] driver.docker: re-attaching to docker process: %s\n", handleID) d.logger.Printf("[INFO] driver.docker: re-attaching to docker process: %s\n", handleID)