This was therefore causing the following exception:
Traceback (most recent call last):
File "/usr/lib64/ganglia/python_modules/httpd.py", line 77, in update_stats
f = urllib.urlopen(STATUS_URL, None, 2)
File "/usr/lib64/python2.7/urllib.py", line 80, in urlopen
opener = FancyURLopener(proxies=proxies)
File "/usr/lib64/python2.7/urllib.py", line 614, in __init__
URLopener.__init__(self, *args, **kwargs)
File "/usr/lib64/python2.7/urllib.py", line 132, in __init__
assert hasattr(proxies, 'has_key'), "proxies must be a mapping"
AssertionError: proxies must be a mapping
Exception AttributeError: "FancyURLopener instance has no attribute 'tempcache'" in <bound method FancyURLopener.__del__ of <urllib.FancyURLopener instance at 0x2133170>> ignored
A fix is to change this module to use urllib2 so this works as expected.
In 246721e429d3883a3f844e149748c35d7517be0a a change was made to add a timeout to various
urllib2
requests. However, in this moduleurllib
is used rather thanurllib2
. Unfortunately, the third argument tourllib.urlopen
isproxies
(https://docs.python.org/2/library/urllib.html#urllib.urlopen) rather thantimeout
, as inurllib2
(https://docs.python.org/2/library/urllib2.html#urllib2.urlopen).This was therefore causing the following exception:
A fix is to change this module to use
urllib2
so this works as expected.