mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Replace redundant isinstance calls with a tuple parameter
This commit is contained in:
@@ -808,8 +808,9 @@ class TelegramBareClient:
|
||||
|
||||
try:
|
||||
import socks
|
||||
if isinstance(error, socks.GeneralProxyError) or \
|
||||
isinstance(error, socks.ProxyConnectionError):
|
||||
if isinstance(error, (
|
||||
socks.GeneralProxyError, socks.ProxyConnectionError
|
||||
)):
|
||||
# This is a known error, and it's not related to
|
||||
# Telegram but rather to the proxy. Disconnect and
|
||||
# hand it over to the main thread.
|
||||
|
Reference in New Issue
Block a user