daemon: Daemon.CreateImageFromContainer(): remove intermediate vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bf5ae17c16
commit
167fa429f0
1 changed files with 2 additions and 4 deletions
|
@ -132,13 +132,11 @@ func (daemon *Daemon) CreateImageFromContainer(ctx context.Context, name string,
|
|||
}
|
||||
|
||||
if container.IsDead() {
|
||||
err := fmt.Errorf("You cannot commit container %s which is Dead", container.ID)
|
||||
return "", errdefs.Conflict(err)
|
||||
return "", errdefs.Conflict(fmt.Errorf("You cannot commit container %s which is Dead", container.ID))
|
||||
}
|
||||
|
||||
if container.IsRemovalInProgress() {
|
||||
err := fmt.Errorf("You cannot commit container %s which is being removed", container.ID)
|
||||
return "", errdefs.Conflict(err)
|
||||
return "", errdefs.Conflict(fmt.Errorf("You cannot commit container %s which is being removed", container.ID))
|
||||
}
|
||||
|
||||
if c.Pause && !container.IsPaused() {
|
||||
|
|
Loading…
Reference in a new issue