/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/rio.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:
36
36
 
37
37
from . import osutils
38
38
from .iterablefile import IterableFile
 
39
from .sixish import (
 
40
    text_type,
 
41
    )
39
42
 
40
43
# XXX: some redundancy is allowing to write stanzas in isolation as well as
41
44
# through a writer object.
136
139
            raise ValueError("invalid tag %r" % (tag,))
137
140
        if isinstance(value, bytes):
138
141
            value = value.decode('ascii')
139
 
        elif isinstance(value, str):
 
142
        elif isinstance(value, text_type):
140
143
            pass
141
144
        else:
142
145
            raise TypeError("invalid type for rio value: %r of type %s"