Skip to content

Commit 2ac0b99

Browse files
author
Alexander Kazeka
authored
Merge pull request litl#29 from pquentin/patch-1
Update README with aiohttp 2.x code
2 parents a1be11c + 0298fd4 commit 2ac0b99

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,7 @@ On Python 3.5 and above with ``async def`` and ``await`` syntax:
255255

256256
.. code-block:: python
257257
258-
@backoff.on_exception(backoff.expo,
259-
aiohttp.errors.ClientError,
260-
max_tries=8)
258+
@backoff.on_exception(backoff.expo, aiohttp.ClientError, max_tries=8)
261259
async def get_url(url):
262260
async with aiohttp.ClientSession() as session:
263261
async with session.get(url) as response:
@@ -267,9 +265,7 @@ In case you use Python 3.4 you can use `@asyncio.coroutine` and `yield from`:
267265

268266
.. code-block:: python
269267
270-
@backoff.on_exception(backoff.expo,
271-
aiohttp.errors.ClientError,
272-
max_tries=8)
268+
@backoff.on_exception(backoff.expo, aiohttp.ClientError, max_tries=8)
273269
@asyncio.coroutine
274270
def get_url_py34(url):
275271
with aiohttp.ClientSession() as session:

0 commit comments

Comments
 (0)