← Back to team overview

pypi-mirror team mailing list archive

[Bug 712989] Re: _extract_filename fails during DNS resolution

 

This is a pretty simple fix, and if not done people's mirrors will be
falling behind as the script just errors out completely if the external
hostname cannot be resolved.

The package in question is:
http://pypi.python.org/pypi/pthy

-- 
You received this bug notification because you are a member of PyPI
Mirror, which is the registrant for PyPI Mirror.
https://bugs.launchpad.net/bugs/712989

Title:
  _extract_filename fails during DNS resolution

Status in PyPI replication project:
  New

Bug description:
  Get the following traceback if the external hostname doesn't resolve:

  2011-02-04 05:29:34,907 DEBUG  Processing package pthy
  2011-02-04 05:29:35,379 DEBUG  Head-Request to get filename for http://pthy.python-hosting.com/attachment/wiki/PthyReleases/pthy-0.5.tar.gz?rev=&format=raw.
  Traceback (most recent call last):
    File "./bin/pypimirror", line 15, in <module>
      z3c.pypimirror.mirror.run()
    File "/usr/home/davidb/.buildout/eggs/z3c.pypimirror-1.0.16-py2.6.egg/z3c/pypimirror/mirror.py", line 824, in run
      config["base_url"])
    File "/usr/home/davidb/.buildout/eggs/z3c.pypimirror-1.0.16-py2.6.egg/z3c/pypimirror/mirror.py", line 482, in mirror
      filename = self._extract_filename(url)
    File "/usr/home/davidb/.buildout/eggs/z3c.pypimirror-1.0.16-py2.6.egg/z3c/pypimirror/mirror.py", line 561, in _extract_filename
      conn.request('HEAD', fetch_url)
    File "/usr/local/lib/python2.6/httplib.py", line 898, in request
      self._send_request(method, url, body, headers)
    File "/usr/local/lib/python2.6/httplib.py", line 935, in _send_request
      self.endheaders()
    File "/usr/local/lib/python2.6/httplib.py", line 892, in endheaders
      self._send_output()
    File "/usr/local/lib/python2.6/httplib.py", line 764, in _send_output
      self.send(msg)
    File "/usr/local/lib/python2.6/httplib.py", line 723, in send
      self.connect()
    File "/usr/local/lib/python2.6/httplib.py", line 704, in connect
      self.timeout)
    File "/usr/local/lib/python2.6/socket.py", line 500, in create_connection
      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  socket.gaierror: [Errno 8] hostname nor servname provided, or not known





References