mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
Don't use setattr for statically known attr names
This commit is contained in:
parent
f9e72d94af
commit
03bdc6ef05
|
@ -600,10 +600,10 @@ class TelegramBaseClient(abc.ABC):
|
|||
connection = getattr(self._sender, "_connection", None)
|
||||
if connection:
|
||||
if isinstance(connection, TcpMTProxy):
|
||||
setattr(connection, "_ip", proxy[0])
|
||||
setattr(connection, "_port", proxy[1])
|
||||
connection._ip = proxy[0]
|
||||
connection._port = proxy[1]
|
||||
else:
|
||||
setattr(connection, "_proxy", proxy)
|
||||
connection._proxy = proxy
|
||||
|
||||
async def _disconnect_coro(self: 'TelegramClient'):
|
||||
await self._disconnect()
|
||||
|
|
Loading…
Reference in New Issue
Block a user