mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-07 21:44:57 +03:00
Remove unnecessary dependency
This commit is contained in:
parent
22a7b64e4e
commit
21a5651400
|
@ -1,22 +1,12 @@
|
||||||
import errno
|
import errno
|
||||||
import ssl
|
import ssl
|
||||||
|
|
||||||
try:
|
|
||||||
import aiohttp
|
|
||||||
except ImportError:
|
|
||||||
aiohttp = None
|
|
||||||
|
|
||||||
|
|
||||||
from .common import Connection
|
from .common import Connection
|
||||||
from ...extensions import TcpClient
|
from ...extensions import TcpClient
|
||||||
|
|
||||||
|
|
||||||
class ConnectionHttp(Connection):
|
class ConnectionHttp(Connection):
|
||||||
def __init__(self, *, loop, timeout, proxy=None):
|
def __init__(self, *, loop, timeout, proxy=None):
|
||||||
if aiohttp is None:
|
|
||||||
raise RuntimeError('HTTP(S) mode requires the aiohttp '
|
|
||||||
'package, which is not installed')
|
|
||||||
|
|
||||||
super().__init__(loop=loop, timeout=timeout, proxy=proxy)
|
super().__init__(loop=loop, timeout=timeout, proxy=proxy)
|
||||||
self.conn = TcpClient(
|
self.conn = TcpClient(
|
||||||
timeout=self._timeout, loop=self._loop, proxy=self._proxy,
|
timeout=self._timeout, loop=self._loop, proxy=self._proxy,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user