/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/plugins/launchpad/test_lp_directory.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-21 04:28:46 UTC
  • mfrom: (7494 work)
  • mto: This revision was merged to the branch mainline in revision 7496.
  • Revision ID: jelmer@jelmer.uk-20200221042846-r8lzqu0jetkw772i
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
try:
22
 
    from xmlrpc.client import Fault
23
 
    from http.client import parse_headers
24
 
except ImportError:  # python < 3
25
 
    from xmlrpclib import Fault
 
21
from xmlrpc.client import Fault
 
22
from http.client import parse_headers
26
23
 
27
24
import breezy
28
25
from ... import (
32
29
    )
33
30
from ...branch import Branch
34
31
from ...directory_service import directories
35
 
from ...sixish import PY3
36
32
from ...tests import (
37
33
    features,
38
34
    ssl_certs,
428
424
    def handle_one_request(self):
429
425
        tcs = self.server.test_case_server
430
426
        requestline = self.rfile.readline()
431
 
        if PY3:
432
 
            parse_headers(self.rfile)
433
 
        else:
434
 
            self.MessageClass(self.rfile, 0)
 
427
        parse_headers(self.rfile)
435
428
        if requestline.startswith(b'POST'):
436
429
            # The body should be a single line (or we don't know where it ends
437
430
            # and we don't want to issue a blocking read)