Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions adafruit_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,10 @@ def request( # noqa: PLR0912,PLR0913,PLR0915 Too many branches,Too many argumen
raise ValueError("Unsupported protocol: " + proto)

if ":" in host:
host, port = host.split(":", 1)
host_only, port = host.split(":", 1)
port = int(port)
else:
host_only = host

if self._last_response:
self._last_response.close()
Expand All @@ -638,7 +640,7 @@ def request( # noqa: PLR0912,PLR0913,PLR0915 Too many branches,Too many argumen
while retry_count < 2:
retry_count += 1
socket = self._connection_manager.get_socket(
host,
host_only,
port,
proto,
session_id=self._session_id,
Expand Down
Loading