summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-10-13 13:48:58 +0200
committerLars-Dominik Braun <lars@6xq.net>2019-10-13 13:48:58 +0200
commit7824199eb42640a4b2d83d7f8fc3aa55204dda89 (patch)
treeeaf43441598727921edf61061ff95e87f060a61e
parent949dd6d2a14f11036d251ef7d11607a214389d17 (diff)
downloadcrocoite-7824199eb42640a4b2d83d7f8fc3aa55204dda89.tar.gz
crocoite-7824199eb42640a4b2d83d7f8fc3aa55204dda89.tar.bz2
crocoite-7824199eb42640a4b2d83d7f8fc3aa55204dda89.zip
devtools: Remove explicit loop parameter
aiohttp removed it with release 4.0.0a1: https://github.com/aio-libs/aiohttp/commit/c8dbe758e2cfa4304cab9a1b056031aba92e4f02 and we weren’t using it anyway.
-rw-r--r--crocoite/devtools.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/crocoite/devtools.py b/crocoite/devtools.py
index 05680f1..8b5c69d 100644
--- a/crocoite/devtools.py
+++ b/crocoite/devtools.py
@@ -42,17 +42,16 @@ class Browser:
Destroyed upon exit.
"""
- __slots__ = ('session', 'url', 'tab', 'loop')
+ __slots__ = ('session', 'url', 'tab')
- def __init__ (self, url, loop=None):
+ def __init__ (self, url):
self.url = URL (url)
self.session = None
self.tab = None
- self.loop = loop
async def __aiter__ (self):
""" List all tabs """
- async with aiohttp.ClientSession (loop=self.loop) as session:
+ async with aiohttp.ClientSession () as session:
async with session.get (self.url.with_path ('/json/list')) as r:
resp = await r.json ()
for tab in resp:
@@ -63,7 +62,7 @@ class Browser:
""" Create tab """
assert self.tab is None
assert self.session is None
- self.session = aiohttp.ClientSession (loop=self.loop)
+ self.session = aiohttp.ClientSession ()
async with self.session.get (self.url.with_path ('/json/new')) as r:
resp = await r.json ()
self.tab = await Tab.create (**resp)