mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
remove code deprecated in tornado 5
Tornado<5 has already been dropped.
This commit is contained in:
parent
36c995eef6
commit
2fc1ec3355
1 changed files with 2 additions and 4 deletions
|
@ -1,13 +1,11 @@
|
||||||
# MIT licensed
|
# MIT licensed
|
||||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
# Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPResponse
|
from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPResponse
|
||||||
from tornado.httpclient import HTTPError
|
from tornado.httpclient import HTTPError
|
||||||
from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future
|
|
||||||
AsyncIOMainLoop().install()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pycurl
|
import pycurl
|
||||||
|
@ -68,7 +66,7 @@ class ResponseManager:
|
||||||
self.req = req
|
self.req = req
|
||||||
|
|
||||||
async def __aenter__(self):
|
async def __aenter__(self):
|
||||||
return await to_asyncio_future(client.fetch(self.req))
|
return await client.fetch(self.req)
|
||||||
|
|
||||||
async def __aexit__(self, exc_type, exc, tb):
|
async def __aexit__(self, exc_type, exc, tb):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Reference in a new issue