summaryrefslogtreecommitdiff
path: root/kvmd/clients
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-05-27 04:50:07 +0300
committerDevaev Maxim <[email protected]>2020-05-27 04:50:07 +0300
commitccff95f757dea847b72a5a61fb8f9b976804598a (patch)
tree410d2108aa901f69bd390d3c594e3c4586a7a2f1 /kvmd/clients
parentd59d2c79a166296dccfa59213174a7d3fc832332 (diff)
refactoring
Diffstat (limited to 'kvmd/clients')
-rw-r--r--kvmd/clients/streamer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/clients/streamer.py b/kvmd/clients/streamer.py
index 91267bef..7a56556b 100644
--- a/kvmd/clients/streamer.py
+++ b/kvmd/clients/streamer.py
@@ -54,7 +54,7 @@ class StreamerClient:
async def read_stream(self) -> AsyncGenerator[Tuple[bool, int, int, bytes], None]:
try:
- async with self.__make_session(infinite=True) as session:
+ async with self.__make_http_session(infinite=True) as session:
async with session.get(
url=self.__make_url("stream"),
params={"extra_headers": "1"},
@@ -85,7 +85,7 @@ class StreamerClient:
raise StreamerError("Reached EOF")
# async def get_snapshot(self) -> Tuple[bool, bytes]:
-# async with self.__make_session(infinite=False) as session:
+# async with self.__make_http_session(infinite=False) as session:
# async with session.get(self.__make_url("snapshot")) as response:
# aiotools.raise_not_200(response)
# return (
@@ -93,7 +93,7 @@ class StreamerClient:
# bytes(await response.read()),
# )
- def __make_session(self, infinite: bool) -> aiohttp.ClientSession:
+ def __make_http_session(self, infinite: bool) -> aiohttp.ClientSession:
kwargs: Dict = {"headers": {"User-Agent": self.__user_agent}}
if infinite:
kwargs["timeout"] = aiohttp.ClientTimeout(