diff --git a/lib/request/certhandler.py b/lib/request/certhandler.py index 9723990e2..57dae6b23 100644 --- a/lib/request/certhandler.py +++ b/lib/request/certhandler.py @@ -7,7 +7,6 @@ See the file 'doc/COPYING' for copying permission import httplib import urllib2 -import sys from lib.core.data import conf @@ -20,9 +19,5 @@ class HTTPSCertAuthHandler(urllib2.HTTPSHandler): def https_open(self, req): return self.do_open(self.getConnection, req) - def getConnection(self, host): - if sys.version_info >= (2, 6): - retVal = httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file, timeout=conf.timeout) - else: - retVal = httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file) - return retVal + def getConnection(self, host, timeout=None): + return httplib.HTTPSConnection(host, key_file=self.key_file, cert_file=self.cert_file, timeout=conf.timeout)