Skip to content

Commit

Permalink
Fixes some minor bugs and unclear syntax (openshift#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamemilio authored and pierreprinetti committed Apr 22, 2024
1 parent dd8b838 commit b14cf44
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/cloud/openstack/clients/machineservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ func getNetworkIDsByFilter(is *InstanceService, opts *networks.ListOpts) ([]stri
if opts == nil {
return []string{}, fmt.Errorf("No Filters were passed")
}
if opts == nil {
return []string{}, fmt.Errorf("Network filters must be provided")
}
pager := networks.List(is.networkClient, opts)
var uids []string
err := pager.EachPage(func(page pagination.Page) (bool, error) {
Expand All @@ -174,7 +171,7 @@ func getNetworkIDsByFilter(is *InstanceService, opts *networks.ListOpts) ([]stri
return true, nil
})
if err != nil {
return uids, err
return []string{}, err
}
return []string{}, nil
}
Expand Down

0 comments on commit b14cf44

Please sign in to comment.