Skip to content

Commit 6100870

Browse files
authored
Drop loop kwarg from async_timeout.timeout (#3)
- async_timeout 4.0.0 drops the loop= kwarg and will fail if its passed
1 parent afc7c12 commit 6100870

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glances_api/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def get_data(self):
4343
url = "{}/{}".format(self.url, "all")
4444

4545
try:
46-
with async_timeout.timeout(5, loop=self._loop):
46+
with async_timeout.timeout(5):
4747
if self.password is None:
4848
response = await self._session.get(url)
4949
else:
@@ -74,7 +74,7 @@ async def get_plugins(self):
7474
url = "{}/{}".format(self.url, "pluginslist")
7575

7676
try:
77-
with async_timeout.timeout(5, loop=self._loop):
77+
with async_timeout.timeout(5):
7878
if self.password is None:
7979
response = await self._session.get(url)
8080
else:

0 commit comments

Comments
 (0)