From 8b87c6ace3d867c3003b7a9c03d93648b96ef18d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:48:03 +0100 Subject: [PATCH] Update tcp.py --- pyrogram/connection/transport/tcp/tcp.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyrogram/connection/transport/tcp/tcp.py b/pyrogram/connection/transport/tcp/tcp.py index a59e1081..13b6e7de 100644 --- a/pyrogram/connection/transport/tcp/tcp.py +++ b/pyrogram/connection/transport/tcp/tcp.py @@ -20,11 +20,7 @@ import asyncio import ipaddress import logging import socket - -try: - import socks -except ImportError: - socks = None +import socks log = logging.getLogger(__name__) @@ -43,10 +39,7 @@ class TCP: self.loop = asyncio.get_event_loop() - if proxy and not socks: - log.warning("Can't use proxy because pysocks is not installed") - - if proxy and socks: + if proxy: hostname = proxy.get("hostname") try: