From a68800b3f03284016a8770eef7a66bf93905aa3d Mon Sep 17 00:00:00 2001 From: Serhii Dylda Date: Mon, 9 Nov 2020 20:09:08 +0100 Subject: [PATCH] Remove unnecessary `if` clause --- telethon/network/connection/connection.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telethon/network/connection/connection.py b/telethon/network/connection/connection.py index 1703e608..48b30bf2 100644 --- a/telethon/network/connection/connection.py +++ b/telethon/network/connection/connection.py @@ -169,9 +169,7 @@ class Connection(abc.ABC): # Create a non-blocking socket and bind it (if local address is specified). sock = socket.socket(mode, socket.SOCK_STREAM) sock.setblocking(False) - - if local_addr is not None: - sock.bind(local_addr) + sock.bind(local_addr) # Actual TCP connection is performed here. await asyncio.wait_for(