[wwwsearch-commits] r29099 - wwwsearch/mechanize/trunk/mechanize
jjlee at codespeak.net
jjlee at codespeak.net
Wed Jun 21 22:08:22 CEST 2006
Author: jjlee
Date: Wed Jun 21 22:08:21 2006
New Revision: 29099
Modified:
wwwsearch/mechanize/trunk/mechanize/_opener.py
Log:
Move OpenerFactory HTTPS capability test into class definition
Modified: wwwsearch/mechanize/trunk/mechanize/_opener.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_opener.py (original)
+++ wwwsearch/mechanize/trunk/mechanize/_opener.py Wed Jun 21 22:08:21 2006
@@ -261,6 +261,8 @@
_urllib2_support.HTTPCookieProcessor,
_urllib2_support.HTTPErrorProcessor,
]
+ if hasattr(httplib, 'HTTPS'):
+ default_classes.append(_urllib2_support.HTTPSHandler)
handlers = []
replacement_handlers = []
@@ -279,8 +281,6 @@
"""
opener = self.klass()
default_classes = list(self.default_classes)
- if hasattr(httplib, 'HTTPS'):
- default_classes.append(_urllib2_support.HTTPSHandler)
skip = []
for klass in default_classes:
for check in handlers:
More information about the wwwsearch-commits
mailing list