diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-10-27 18:30:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-27 18:30:16 +0100 |
| commit | 761968da584199e74a23d6381b3f6b400906083f (patch) | |
| tree | d9f4b58bcc67cc8342451c40e23d8595e0f61764 | |
| parent | c4ead67fd111aa44314e604df1c4ec475fcedd45 (diff) | |
| parent | 133a6ce5649d94dfeac9aa07ac410e6a3d7ccf6a (diff) | |
| download | vyos-1x-761968da584199e74a23d6381b3f6b400906083f.tar.gz vyos-1x-761968da584199e74a23d6381b3f6b400906083f.zip | |
Merge pull request #4811 from c-po/del-container-image-fix
T7957: filter stderr when deleting container images
| -rwxr-xr-x | src/op_mode/container.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/op_mode/container.py b/src/op_mode/container.py index 3dd665051..a34901cb4 100755 --- a/src/op_mode/container.py +++ b/src/op_mode/container.py @@ -120,11 +120,11 @@ def delete_image(name: str, force: typing.Optional[bool] = False): for image in name: # convert the truncated image ID to a full image ID - rc, ancestor = rc_cmd(f'podman inspect {image} --format "{{{{.Id}}}}"') + rc, ancestor = rc_cmd(f'podman inspect {image} --format "{{{{.Id}}}}"', stderr=None) if rc != 0: raise vyos.opmode.InternalError(ancestor) # check if the image ID is an ancestor of any running container - rc, in_use = rc_cmd(f'podman ps --filter ancestor={ancestor} -q') + rc, in_use = rc_cmd(f'podman ps --filter ancestor={ancestor} -q', stderr=None) if rc != 0: raise vyos.opmode.InternalError(in_use) |
