From 8d8746adeeab8a39ccedb5b06fe8d0a785a97190 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 5 Jun 2020 18:23:12 +0200 Subject: generate systemd: create pod template Create a new template for generating a pod unit file. Eventually, this allows for treating and extending pod and container generation seprately. The `--new` flag now also works on pods. Signed-off-by: Valentin Rothberg --- libpod/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/pod.go b/libpod/pod.go index f53290876..bf0d7a397 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -260,7 +260,7 @@ func (p *Pod) InfraContainerID() (string, error) { // InfraContainer returns the infra container. func (p *Pod) InfraContainer() (*Container, error) { if !p.HasInfraContainer() { - return nil, errors.New("pod has no infra container") + return nil, errors.Wrap(define.ErrNoSuchCtr, "pod has no infra container") } id, err := p.InfraContainerID() -- cgit v1.2.3-54-g00ecf