Skip to content

Commit

Permalink
Merge pull request #17376 from vrothberg/fix-17341
Browse files Browse the repository at this point in the history
network ls: handle removed container
  • Loading branch information
openshift-merge-robot authored Feb 7, 2023
2 parents c4ec99a + ced9342 commit 77ab826
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api/handlers/compat/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func convertLibpodNetworktoDockerNetwork(runtime *libpod.Runtime, network *netty
for _, con := range cons {
data, err := con.Inspect(false)
if err != nil {
if errors.Is(err, define.ErrNoSuchCtr) || errors.Is(err, define.ErrCtrRemoved) {
continue
}
return nil, err
}
if netData, ok := data.NetworkSettings.Networks[network.Name]; ok {
Expand Down

0 comments on commit 77ab826

Please sign in to comment.