refactoring

This commit is contained in:
Devaev Maxim
2020-05-18 13:34:23 +03:00
parent 3947640771
commit 028e0b06ff
10 changed files with 110 additions and 132 deletions

View File

@@ -183,7 +183,7 @@ class Streamer: # pylint: disable=too-many-instance-attributes
headers={"User-Agent": make_user_agent("KVMD")},
timeout=self.__timeout,
) as response:
response.raise_for_status()
aiotools.raise_not_200(response)
state = (await response.json())["result"]
except (aiohttp.ClientConnectionError, aiohttp.ServerConnectionError):
pass