SpiffyTitles: Better Proxy Formatting

This commit is contained in:
Gordon Shumway 2021-08-20 15:45:31 -04:00 committed by GitHub
parent d93428af0d
commit 52d087873c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,8 +69,10 @@ class SpiffyTitles(callbacks.Plugin):
self.proxies["https"] = None
proxy = str(conf.supybot.protocols.http.proxy)
if proxy:
self.proxies["http"] = "http://{0}".format(proxy)
self.proxies["https"] = "https://{0}".format(proxy)
if "http" not in proxy:
proxy = "http://{0}".format(proxy)
self.proxies["http"] = proxy
self.proxies["https"] = proxy
def add_handlers(self):
"""