/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-05-06 03:06:18 UTC
  • mfrom: (7500.1.2 trunk-merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200506030618-131sjbc876q7on66
Merge the 3.1 branch.

Merged from https://code.launchpad.net/~jelmer/brz/trunk-merge-3.1/+merge/383481

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
# \subsection{\emph{rio} - simple text metaformat}
20
18
#
21
19
# \emph{r} stands for `restricted', `reproducible', or `rfc822-like'.
36
34
 
37
35
from . import osutils
38
36
from .iterablefile import IterableFile
39
 
from .sixish import (
40
 
    text_type,
41
 
    )
42
37
 
43
38
# XXX: some redundancy is allowing to write stanzas in isolation as well as
44
39
# through a writer object.
139
134
            raise ValueError("invalid tag %r" % (tag,))
140
135
        if isinstance(value, bytes):
141
136
            value = value.decode('ascii')
142
 
        elif isinstance(value, text_type):
 
137
        elif isinstance(value, str):
143
138
            pass
144
139
        else:
145
140
            raise TypeError("invalid type for rio value: %r of type %s"