diff options
author | Mathieu Bridon <[email protected]> | 2018-06-07 12:26:20 +0200 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-08-01 14:26:19 +0100 |
commit | 91939255a7c556a5d85a57fb6a191e0c8cfd29ce (patch) | |
tree | 16516add106064ecc4f39cec18bdb080b30faf83 /src/amd/common | |
parent | ad363913e6766280f53838126d67370f9e97aa12 (diff) |
python: Use the unicode_escape codec
Python 2 had string_escape and unicode_escape codecs. Python 3 only has
the latter. These work the same as far as we're concerned, so let's use
the future-proof one.
However, the reste of the code expects unicode strings, so we need to
decode them again.
Signed-off-by: Mathieu Bridon <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/sid_tables.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/common/sid_tables.py b/src/amd/common/sid_tables.py index 421c2a13352..7b5e626e3e1 100644 --- a/src/amd/common/sid_tables.py +++ b/src/amd/common/sid_tables.py @@ -65,7 +65,7 @@ class StringTable: """ fragments = [ '"%s\\0" /* %s */' % ( - te[0].encode('string_escape'), + te[0].encode('unicode_escape').decode(), ', '.join(str(idx) for idx in sorted(te[2])) ) for te in self.table |