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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-09-11 04:20:02 UTC
  • mfrom: (7078.15.2 some-more)
  • Revision ID: breezy.the.bot@gmail.com-20180911042002-ypajcg75djohngdv
Fix a couple more tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/some-more/+merge/353541

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
    # real Unicode string. Unicode and plain strings of this type will have the
109
109
    # same hash, so we can just use it as the key in _uni_to_utf8, but we need
110
110
    # the return value to be different in _utf8_to_uni
111
 
    ascii_str = _uni_to_utf8.setdefault(ascii_str, ascii_str)
112
 
    _utf8_to_uni.setdefault(ascii_str, ascii_str.decode('ascii'))
 
111
    uni_str = ascii_str.decode('ascii')
 
112
    ascii_str = _uni_to_utf8.setdefault(uni_str, ascii_str)
 
113
    _utf8_to_uni.setdefault(ascii_str, uni_str)
113
114
    return ascii_str
114
115
 
115
116