Skip to content

Commit

Permalink
added support for old aiohttp version
Browse files Browse the repository at this point in the history
  • Loading branch information
blikenoother committed Apr 3, 2017
1 parent b3353ac commit fee8d34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aiourlshortener/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .shorteners import Shortener, Shorteners

__version__ = '0.0.2'
__version__ = '0.0.3'
__author__ = 'Chirag Patel'
__license__ = 'MIT'
5 changes: 4 additions & 1 deletion aiourlshortener/shorteners/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def expand(self, url: str) -> str:

@coroutine
def close(self):
yield from self._session.close()
try:
yield from self._session.close()
except TypeError:
pass

@classmethod
def __subclasshook__(cls, c):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
long_description=open('README.md').read(),
packages=find_packages(include=('*')),
keywords='asynchronous url shortener',
install_requires=['aiohttp==2.0.2'],
install_requires=['aiohttp'],
classifiers=['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',
'Operating System :: OS Independent', 'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Expand Down

0 comments on commit fee8d34

Please sign in to comment.