gaiohttp.py 500 B

1234567891011121314151617
  1. # -*- coding: utf-8 -
  2. #
  3. # This file is part of gunicorn released under the MIT license.
  4. # See the NOTICE for more information.
  5. import sys
  6. if sys.version_info >= (3, 3):
  7. try:
  8. import aiohttp # NOQA
  9. except ImportError:
  10. raise RuntimeError("You need aiohttp installed to use this worker.")
  11. else:
  12. from gunicorn.workers._gaiohttp import AiohttpWorker
  13. __all__ = ['AiohttpWorker']
  14. else:
  15. raise RuntimeError("You need Python >= 3.3 to use the asyncio worker")