Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from jacobtomlinson/async_timeout
Browse files Browse the repository at this point in the history
Fix Async Timeout
  • Loading branch information
hellysmile committed Oct 1, 2018
2 parents 03c451e + a7da18f commit feb10df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aioslacker/__init__.py
Expand Up @@ -2,6 +2,7 @@
from urllib.parse import urlencode

import aiohttp
import async_timeout
import requests
import slacker

Expand Down Expand Up @@ -79,7 +80,7 @@ def __request(self, method, api, **kwargs):
_response = None

try:
with aiohttp.Timeout(self.timeout, loop=self.loop):
with async_timeout.timeout(self.timeout, loop=self.loop):
_response = yield from _request

_response.raise_for_status()
Expand Down Expand Up @@ -285,7 +286,7 @@ def post(self, data):
_response = None

try:
with aiohttp.Timeout(self.timeout, loop=self.loop):
with async_timeout.timeout(self.timeout, loop=self.loop):
_response = yield from _request

_response.raise_for_status()
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -30,6 +30,7 @@ def read(*parts):
long_description=read('README.rst'),
install_requires=[
'aiohttp>=1.3.0',
'async_timeout>=3.0.0',
'slacker<=0.9.42',
],
packages=['aioslacker'],
Expand Down

0 comments on commit feb10df

Please sign in to comment.