/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: 2018-02-18 21:42:57 UTC
  • mto: This revision was merged to the branch mainline in revision 6859.
  • Revision ID: jelmer@jelmer.uk-20180218214257-jpevutp1wa30tz3v
Update TODO to reference Breezy, not Bazaar.

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