/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/mutabletree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-03 23:21:15 UTC
  • mfrom: (7290.42.6 paramiko-compat)
  • Revision ID: breezy.the.bot@gmail.com-20200203232115-g7k11bhsfeiqcprv
Fix compatibility with newer versions of paramiko, which break on noise before keys in pem files.

Merged from https://code.launchpad.net/~jelmer/brz/paramiko-compat/+merge/378480

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    tree,
30
30
    )
31
31
 
 
32
from .sixish import (
 
33
    text_type,
 
34
    )
32
35
 
33
36
 
34
37
class BadReferenceTarget(errors.InternalBzrError):
98
101
 
99
102
        TODO: Perhaps callback with the ids and paths as they're added.
100
103
        """
101
 
        if isinstance(files, str):
 
104
        if isinstance(files, (str, text_type)):
102
105
            # XXX: Passing a single string is inconsistent and should be
103
106
            # deprecated.
104
107
            if not (ids is None or isinstance(ids, bytes)):
105
108
                raise AssertionError()
106
 
            if not (kinds is None or isinstance(kinds, str)):
 
109
            if not (kinds is None or isinstance(kinds, (str, text_type))):
107
110
                raise AssertionError()
108
111
            files = [files]
109
112
            if ids is not None: