Skip to content

Commit 31251e3

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Handle NotFoundException when listing floating IPs"
2 parents e46a7a2 + b0936c5 commit 31251e3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

openstackclient/network/v2/floating_ip.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
"""IP Floating action implementations"""
1414

15+
from openstack import exceptions as sdk_exceptions
1516
from osc_lib import utils
1617
from osc_lib.utils import tags as _tag
1718

@@ -390,7 +391,10 @@ def take_action_network(self, client, parsed_args):
390391

391392
_tag.get_tag_filtering_args(parsed_args, query)
392393

393-
data = client.ips(**query)
394+
try:
395+
data = list(client.ips(**query))
396+
except sdk_exceptions.NotFoundException:
397+
data = []
394398

395399
return (
396400
headers,

0 commit comments

Comments
 (0)