Skip to content

Commit 3a073c9

Browse files
Improve compatibility with Python3.8+ and Play(UPC) Connect Box (#32)
* Improve compatibility with Python3.8+ and Play(UPC) Connect Box * fixup! Improve compatibility with Python3.8+ and Play(UPC) Connect Box * fixup! Improve compatibility with Python3.8+ and Play(UPC) Connect Box
1 parent 4c9c96f commit 3a073c9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Python Client for interacting with the cable modem/router Compal CH7465LG which
55
is provided under different names by various ISP in Europe.
66

77
- UPC Connect Box (CH)
8+
- Play Connect Box (PL)
89
- Irish Virgin Media Super Hub 3.0 (IE)
910
- Ziggo Connectbox (NL)
1011
- Unitymedia Connect Box (DE)

connect_box/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ async def _async_initialize_valid_token(self) -> None:
514514
headers=self.headers,
515515
timeout=10,
516516
) as response:
517-
await response.text()
518-
#self.token = response.cookies["sessionToken"].value
517+
await response.read()
518+
self.token = response.cookies["sessionToken"].value
519519

520520
except (asyncio.TimeoutError, aiohttp.ClientError) as err:
521521
_LOGGER.error("Can not load login page from %s: %s", self.host, err)
@@ -531,7 +531,7 @@ async def _async_do_login_with_password(self, function: int) -> None:
531531
allow_redirects=False,
532532
timeout=10,
533533
) as response:
534-
await response.text()
534+
await response.read()
535535

536536
if response.status != 200:
537537
_LOGGER.warning("Login error with code %d", response.status)

0 commit comments

Comments
 (0)