Fix formatting of mercurial revisions with Python 3.8

Review Request #11135 — Created Aug. 10, 2020 and submitted

Information

RBTools
release-2.0.x

Reviewers

In Python 3.8, attempting to use formatting on a bytestring with
dictionary parameters will end up looking for the keys as bytestrings
rather than unicode. This results in a KeyError. This change fixes it so
we do the format entirely as str and then encode to bytes.

  • Verified that the encoding worked correctly.
  • Ran unit tests.
Summary ID
Fix formatting of mercurial revisions with Python 3.8
In Python 3.8, attempting to use formatting on a bytestring with dictionary parameters will end up looking for the keys as bytestrings rather than unicode. This results in a KeyError. This change fixes it so we do the format entirely as `str` and then encode to `bytes`. Testing Done: - Verified that the encoding worked correctly. - Ran unit tests.
7189081c3f70979ee532e299dd937c2cea10c0ce
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (959a547)
Loading...