Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitab7de69

Browse files
PortManager::find_free_port is updated
We will use exclude_ports only when it is not none.Creation of empty exclude_ports is removed.
1 parent4453e8f commitab7de69

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎testgres/helpers/port_manager.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ def find_free_port(self, ports: Optional[Set[int]] = None, exclude_ports: Option
2626
ifportsisNone:
2727
ports=set(range(1024,65535))
2828

29-
ifexclude_portsisNone:
30-
exclude_ports=set()
31-
32-
ports.difference_update(set(exclude_ports))
29+
ifexclude_portsisnotNone:
30+
ports.difference_update(set(exclude_ports))
3331

3432
sampled_ports=random.sample(tuple(ports),min(len(ports),100))
3533

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp