/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/https_server.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""HTTPS test server, available when ssl python module is available"""
18
18
 
19
19
import ssl
20
 
import sys
21
20
 
22
21
from . import (
23
22
    http_server,
32
31
        self.key_file = key_file
33
32
        self.cert_file = cert_file
34
33
 
35
 
    def _get_ssl_request (self, sock, addr):
 
34
    def _get_ssl_request(self, sock, addr):
36
35
        """Wrap the socket with SSL"""
37
36
        ssl_sock = ssl.wrap_socket(sock, server_side=True,
38
37
                                   keyfile=self.key_file,
51
50
        if serving:
52
51
            try:
53
52
                request.do_handshake()
54
 
            except ssl.SSLError as e:
 
53
            except ssl.SSLError:
55
54
                # FIXME: We proabaly want more tests to capture which ssl
56
55
                # errors are worth reporting but mostly our tests want an https
57
56
                # server that works -- vila 2012-01-19