summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-10 12:50:37 -0400
committerGitHub <noreply@github.com>2020-08-10 12:50:37 -0400
commit5ba21849a517659203a5879553f5dfb20963b7b5 (patch)
tree44a59a165de27275077ac540d0b3e1be3e3ead29 /pkg
parent162625f2e74c8ad9bf9a7337baaa2621bbf0a26e (diff)
parent6865058f2fa9faac5ee8db6b616c0734b1bb5805 (diff)
downloadpodman-5ba21849a517659203a5879553f5dfb20963b7b5.tar.gz
podman-5ba21849a517659203a5879553f5dfb20963b7b5.tar.bz2
podman-5ba21849a517659203a5879553f5dfb20963b7b5.zip
Merge pull request #7272 from vrothberg/issue-7271
generate systemd: fix error handling
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/generate.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go
index 93c4ede49..0b73ddd7e 100644
--- a/pkg/domain/infra/abi/generate.go
+++ b/pkg/domain/infra/abi/generate.go
@@ -20,9 +20,10 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
if ctrErr == nil {
// Generate the unit for the container.
s, err := generate.ContainerUnit(ctr, options)
- if err == nil {
- return &entities.GenerateSystemdReport{Output: s}, nil
+ if err != nil {
+ return nil, err
}
+ return &entities.GenerateSystemdReport{Output: s}, nil
}
// If it's not a container, we either have a pod or garbage.