/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/bzr/smart/request.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:
34
34
 
35
35
 
36
36
import threading
37
 
try:
38
 
    from _thread import get_ident
39
 
except ImportError:  # Python < 3
40
 
    from thread import get_ident
 
37
from _thread import get_ident
41
38
 
42
39
from ... import (
43
40
    branch as _mod_branch,
49
46
    trace,
50
47
    urlutils,
51
48
    )
52
 
from ...sixish import text_type
53
49
from ...lazy_import import lazy_import
54
50
lazy_import(globals(), """
55
51
from breezy.bzr import bzrdir
449
445
        # If it is a DecodeError, than most likely we are starting
450
446
        # with a plain string
451
447
        str_or_unicode = err.object
452
 
        if isinstance(str_or_unicode, text_type):
 
448
        if isinstance(str_or_unicode, str):
453
449
            # XXX: UTF-8 might have \x01 (our protocol v1 and v2 seperator
454
450
            # byte) in it, so this encoding could cause broken responses.
455
451
            # Newer clients use protocol v3, so will be fine.