Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: raaka1/gmond_python_modules
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ganglia/gmond_python_modules
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 3, 2017

  1. Switch to urllib2 to prevent exception

    In 246721e a change was made to add a
    timeout to various `urllib2` requests. However, in this module `urllib`
    is used rather than `urllib2`. Unfortunately, the third argument to
    `urllib.urlopen` is `proxies`
    (https://docs.python.org/2/library/urllib.html#urllib.urlopen) rather
    than `timeout`, as in `urllib2`
    (https://docs.python.org/2/library/urllib2.html#urllib2.urlopen).
    
    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.
    bobwhitelock committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    3d8227e View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2018

  1. Merge pull request ganglia#228 from alces-software/prevent-urllib-error

    Switch to urllib2 to prevent exception
    jbuchbinder authored Nov 8, 2018
    Configuration menu
    Copy the full SHA
    2f7fcab View commit details
    Browse the repository at this point in the history
Loading