[Python-checkins] r47050 - sandbox/trunk/setuptools/setuptools/package_index.py

phillip.eby python-checkins at python.org
Tue Jun 20 23:19:24 CEST 2006


Author: phillip.eby
Date: Tue Jun 20 23:19:24 2006
New Revision: 47050
Modified:
 sandbox/trunk/setuptools/setuptools/package_index.py
Log:
Fix ftp:// directory listing URLs from causing a crash when used in the 
URL or Download URL slot on PyPI.
Modified: sandbox/trunk/setuptools/setuptools/package_index.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/package_index.py	(original)
+++ sandbox/trunk/setuptools/setuptools/package_index.py	Tue Jun 20 23:19:24 2006
@@ -162,7 +162,7 @@
 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
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /