Permalink
Browse files

fix import error when using with python2.3

  • Loading branch information...
1 parent 23ec4c0 commit 85eadd835ee4c214e2088f7e182e7b153f30b87f @anandology anandology committed May 31, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 web/browser.py
View
@@ -220,8 +220,12 @@ def http_open(self, req):
def https_open(self, req):
return self.http_open(req)
-
- https_request = urllib2.HTTPHandler.do_request_
+
+ try:
+ https_request = urllib2.HTTPHandler.do_request_
+ except AttributeError:
+ # for python 2.3
+ pass
def _make_response(self, result, url):
data = "\r\n".join(["%s: %s" % (k, v) for k, v in result.header_items])

0 comments on commit 85eadd8

Please sign in to comment.