Replace redundant isinstance calls with a tuple parameter

This commit is contained in:
Lonami Exo
2017-10-13 11:38:12 +02:00
parent db63b5e39a
commit 4fd9d361f0
5 changed files with 17 additions and 23 deletions

View File

@@ -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.