/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

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)