Skip to content

Commit ff7d9d7

Browse files
liuhuajieMrStupnikov
authored andcommitted
[trivial] Simplify dict get call by removing unused default
The default value of the dictionary get method is None, so remove the default value of None in the get method Change-Id: Ic1b69047b6edd4987df3191ce84658393a1cb968
1 parent bcb96f3 commit ff7d9d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nova/network/neutron.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ def _ports_needed_per_instance(self, context, neutron, requested_networks):
24982498
if request.port_id:
24992499
port = self._show_port(context, request.port_id,
25002500
neutron_client=neutron)
2501-
if port.get('device_id', None):
2501+
if port.get('device_id'):
25022502
raise exception.PortInUse(port_id=request.port_id)
25032503

25042504
deferred_ip = port.get('ip_allocation') == 'deferred'

0 commit comments

Comments
 (0)