From 734623ae716f8cdc110232f8fb41b80448c1ba92 Mon Sep 17 00:00:00 2001 From: t0rr Date: Fri, 17 Aug 2018 12:18:22 +0300 Subject: [PATCH] #65 bug fix with no proxy_auth --- aiogram/bot/base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aiogram/bot/base.py b/aiogram/bot/base.py index e37f1923..e3a78054 100644 --- a/aiogram/bot/base.py +++ b/aiogram/bot/base.py @@ -63,9 +63,11 @@ class BaseBot: from aiohttp_socks.helpers import parse_socks_url socks_ver, host, port, username, password = parse_socks_url(proxy) - if proxy_auth and not username or password: - username = proxy_auth.login - password = proxy_auth.password + if proxy_auth: + if not username: + username = proxy_auth.login + if not password: + password = proxy_auth.password connector = SocksConnector(socks_ver=socks_ver, host=host, port=port, username=username, password=password,