/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/revision.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:
28
28
    errors,
29
29
    osutils,
30
30
    )
31
 
from .sixish import (
32
 
    text_type,
33
 
    )
34
31
 
35
32
NULL_REVISION = b"null:"
36
33
CURRENT_REVISION = b"current:"
90
87
        """Verify that all revision properties are OK."""
91
88
        for name, value in self.properties.items():
92
89
            # GZ 2017-06-10: What sort of string are properties exactly?
93
 
            not_text = not isinstance(name, (text_type, str))
 
90
            not_text = not isinstance(name, str)
94
91
            if not_text or osutils.contains_whitespace(name):
95
92
                raise ValueError("invalid property name %r" % name)
96
 
            if not isinstance(value, (text_type, bytes)):
 
93
            if not isinstance(value, (str, bytes)):
97
94
                raise ValueError("invalid property value %r for %r" %
98
95
                                 (value, name))
99
96