Commits

Anonymous committed bbc336b

Fix ``ftp://`` directory listing URLs from causing a crash when used in
the "Home page" or "Download URL" slots on PyPI.
(merged from the trunk)

Comments (0)

Files changed (2)

 0.6b4
  * Fix creating Python wrappers for non-Python scripts
 
+ * Fix ``ftp://`` directory listing URLs from causing a crash when used in the
+   "Home page" or "Download URL" slots on PyPI.
+
 0.6b3
  * Fix local ``--find-links`` eggs not being copied except with
    ``--always-copy``.

setuptools/package_index.py

         self.fetched_urls[url] = self.fetched_urls[f.url] = True
 
 
-        if 'html' not in f.headers['content-type'].lower():
+        if 'html' not in f.headers.get('content-type', '').lower():
             f.close()   # not html, we can't process it
             return