##// END OF EJS Templates
move __del__ from httprepository to basehttphandler...
Alexis S. L. Carvalho -
r5982:b6bd4ee6 default
parent child Browse files
Show More
@@ -107,6 +107,9 b' class basehttphandler(keepalive.HTTPHand'
107 107 def http_open(self, req):
108 108 return self.do_open(httpconnection, req)
109 109
110 def __del__(self):
111 self.close_all()
112
110 113 has_https = hasattr(urllib2, 'HTTPSHandler')
111 114 if has_https:
112 115 class httpsconnection(httplib.HTTPSConnection):
@@ -203,8 +206,7 b' class httprepository(remoterepository):'
203 206
204 207 proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy')
205 208 # XXX proxyauthinfo = None
206 self.handler = httphandler()
207 handlers = [self.handler]
209 handlers = [httphandler()]
208 210
209 211 if proxyurl:
210 212 # proxy can be proper url or host[:port]
@@ -270,11 +272,6 b' class httprepository(remoterepository):'
270 272 opener.addheaders = [('User-agent', 'mercurial/proto-1.0')]
271 273 urllib2.install_opener(opener)
272 274
273 def __del__(self):
274 if self.handler:
275 self.handler.close_all()
276 self.handler = None
277
278 275 def url(self):
279 276 return self.path
280 277
General Comments 0
You need to be logged in to leave comments. Login now