mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Update conf.py
This commit is contained in:
parent
8d2da9aa3a
commit
14e5c490e6
@ -38,6 +38,10 @@ from .utils import minisix
|
|||||||
from .version import version
|
from .version import version
|
||||||
from .i18n import PluginInternationalization
|
from .i18n import PluginInternationalization
|
||||||
_ = PluginInternationalization()
|
_ = PluginInternationalization()
|
||||||
|
if minisix.PY2:
|
||||||
|
from urllib2 import build_opener, install_opener, ProxyHandler
|
||||||
|
else:
|
||||||
|
from urllib.request import build_opener, install_opener, ProxyHandler
|
||||||
|
|
||||||
###
|
###
|
||||||
# *** The following variables are affected by command-line options. They are
|
# *** The following variables are affected by command-line options. They are
|
||||||
@ -1173,10 +1177,6 @@ registerGlobalValue(supybot.protocols.http, 'peekSize',
|
|||||||
class HttpProxy(registry.String):
|
class HttpProxy(registry.String):
|
||||||
"""Value must be a valid hostname:port string."""
|
"""Value must be a valid hostname:port string."""
|
||||||
def setValue(self, v):
|
def setValue(self, v):
|
||||||
if minisix.PY2:
|
|
||||||
from urllib2 import build_opener, install_opener, ProxyHandler
|
|
||||||
else:
|
|
||||||
from urllib.request import build_opener, install_opener, ProxyHandler
|
|
||||||
proxies = {}
|
proxies = {}
|
||||||
if v != "":
|
if v != "":
|
||||||
# TODO: improve checks
|
# TODO: improve checks
|
||||||
|
Loading…
Reference in New Issue
Block a user