mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Some cleaning + move "/version" endpoint to "/server/version".
This commit is contained in:
1 parent
87f15eafe0
commit
cd07a99118
18 files changed
+70
-187
No files matched your search
@@ -135,7 +135,7 @@ class PortManager:
|
||||
return self._used_udp_ports
|
||||
|
||||
@staticmethod
|
||||
def find_unused_port(start_port, end_port, host="127.0.0.1", socket_type="TCP", ignore_ports=[]):
|
||||
def find_unused_port(start_port, end_port, host="127.0.0.1", socket_type="TCP", ignore_ports=None):
|
||||
"""
|
||||
Finds an unused port in a range.
|
||||
|
||||
@@ -151,7 +151,7 @@ class PortManager:
|
||||
|
||||
last_exception = None
|
||||
for port in range(start_port, end_port + 1):
|
||||
if port in ignore_ports or port in BANNED_PORTS:
|
||||
if ignore_ports and (port in ignore_ports or port in BANNED_PORTS):
|
||||
continue
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user