diff options
| author | Andrew Laski <andrew.laski@rackspace.com> | 2012-10-25 21:34:53 -0400 |
|---|---|---|
| committer | Andrew Laski <andrew.laski@rackspace.com> | 2012-10-25 21:34:53 -0400 |
| commit | 775e98580d0b405f0da9bd8e3cfe062ee49aa4c1 (patch) | |
| tree | ae6316a2af917d9f01f21384b8743bf1ac41984c /nova | |
| parent | f1e5fbf92af1fb1e1c2f0634870159e7bac19cfd (diff) | |
More robust checking for empty requested_networks
It's possible that requested_networks will be empty but not None.
Especially since novaclient defaults to an empty list. This avoids
attempting an unnecessary validation.
Change-Id: I131dbb3f6cc6167e150d4a46386e6b0b51035579
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 9611f0fff..a30715762 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -280,7 +280,7 @@ class API(base.Base): and the fixed IP address for each network provided is within same the network block """ - if requested_networks is None: + if not requested_networks: return self.network_api.validate_networks(context, requested_networks) |
