Skip to content

Commit

Permalink
Set stack level and explicit warning type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson authored Oct 16, 2024
1 parent 4fc9e64 commit 1a07788
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion distributed/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,9 @@ async def listen(self, port_or_addr=None, allow_offload=True, **kwargs):
raise
warnings.warn(
f"Address {addr} is already in use.\n"
f"Falling back to {fallback_port_or_addr} instead"
f"Falling back to {fallback_port_or_addr} instead",
UserWarning,
stacklevel=2,
)
listener = await listen(
fallback_port_or_addr,
Expand Down

0 comments on commit 1a07788

Please sign in to comment.