/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/version_info_formats/format_custom.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:
26
26
    NULL_REVISION,
27
27
    )
28
28
from breezy.lazy_regex import lazy_compile
29
 
from breezy.sixish import PY3
30
29
from breezy.version_info_formats import (
31
30
    create_date_str,
32
31
    VersionInfoBuilder,
76
75
    def process(self, tpl):
77
76
        unicode_escape = codecs.getdecoder("unicode_escape")
78
77
        tpl = unicode_escape(tpl)[0]
79
 
        if not PY3:
80
 
            tpl = tpl.encode('utf-8')
81
78
        pos = 0
82
79
        while True:
83
80
            match = self._tag_re.search(tpl, pos)