comparison mercurial/url.py @ 13419:1cc73868c740

url: remove test for self.ui in BetterHTTPS We use self.ui unconditionally anyway so we would have noticed if it in some cases wasn't set.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 16 Feb 2011 04:28:17 +0100
parents 5bced0d28a39
children 051f498628f7
comparison
equal deleted inserted replaced
13418:28555e294104 13419:1cc73868c740
544 if has_https: 544 if has_https:
545 class BetterHTTPS(httplib.HTTPSConnection): 545 class BetterHTTPS(httplib.HTTPSConnection):
546 send = keepalive.safesend 546 send = keepalive.safesend
547 547
548 def connect(self): 548 def connect(self):
549 if hasattr(self, 'ui'): 549 cacerts = self.ui.config('web', 'cacerts')
550 cacerts = self.ui.config('web', 'cacerts') 550 if cacerts:
551 if cacerts: 551 cacerts = util.expandpath(cacerts)
552 cacerts = util.expandpath(cacerts)
553 else:
554 cacerts = None
555 552
556 hostfingerprint = self.ui.config('hostfingerprints', self.host) 553 hostfingerprint = self.ui.config('hostfingerprints', self.host)
557 if cacerts and not hostfingerprint: 554 if cacerts and not hostfingerprint:
558 sock = _create_connection((self.host, self.port)) 555 sock = _create_connection((self.host, self.port))
559 self.sock = _ssl_wrap_socket(sock, self.key_file, 556 self.sock = _ssl_wrap_socket(sock, self.key_file,