mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
Update error codes following merge
This commit is contained in:
parent
24b85cabd0
commit
4c61450f13
|
@ -1763,13 +1763,13 @@ def find_available_port(start, host, auto_select=False):
|
|||
|
||||
port = start
|
||||
if not auto_select:
|
||||
raise ValueError(Errors.E1049.format(port=port))
|
||||
raise ValueError(Errors.E1050.format(port=port))
|
||||
|
||||
while is_port_in_use(port, host) and port < 65535:
|
||||
port += 1
|
||||
|
||||
if port == 65535 and is_port_in_use(port, host):
|
||||
raise ValueError(Errors.E1048.format(host=host))
|
||||
raise ValueError(Errors.E1049.format(host=host))
|
||||
|
||||
# if we get here, the port changed
|
||||
warnings.warn(Warnings.W124.format(host=host, port=start, serve_port=port))
|
||||
|
|
Loading…
Reference in New Issue
Block a user