modify proxies argument.

This commit is contained in:
sangoh.hong 2019-01-14 21:50:49 +09:00
parent f73ac23b7b
commit e594b56414

View File

@ -98,11 +98,10 @@ class GlancesWebList(object):
# Indice
new_web['indice'] = 'web_' + str(i)
# SSL verify
# ssl_verify
new_web['ssl_verify'] = config.get_value(self._section,
'%sssl_verify' % postfix,
default='True')
default=True)
# Proxy
http_proxy = config.get_value(self._section,
'%shttp_proxy' % postfix,
@ -111,7 +110,12 @@ class GlancesWebList(object):
https_proxy = config.get_value(self._section,
'%shttps_proxy' % postfix,
default=None)
if https_proxy is None and http_proxy is None:
new_web['proxies'] = None
else:
new_web['proxies'] = {'http' : http_proxy,
'https' : https_proxy }
# Add the server to the list
logger.debug("Add Web URL %s to the static list" % new_web['url'])