mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-09 03:25:20 +03:00
Use pop() instead of pop(0) for O(1) port removal
This commit is contained in:
parent
59e5f8dd2f
commit
390a40ce80
@ -838,7 +838,7 @@ class Project:
|
||||
"""
|
||||
ports = self._preallocated_udp_ports.get(compute_id, [])
|
||||
if ports:
|
||||
return ports.pop(0)
|
||||
return ports.pop()
|
||||
return None
|
||||
|
||||
@open_required
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user