mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
This commit is contained in:
parent
d83b7c2df4
commit
74a49ac3f5
5 changed files with 12 additions and 14 deletions
|
@ -145,7 +145,7 @@ def decode(input, output, header=False):
|
|||
new = new + c; i = i+1
|
||||
elif i+1 == n and not partial:
|
||||
partial = 1; break
|
||||
elif i+1 < n and line[i+1] == ESCAPE:
|
||||
elif i+1 < n and line[i+1:i+2] == ESCAPE:
|
||||
new = new + ESCAPE; i = i+2
|
||||
elif i+2 < n and ishex(line[i+1:i+2]) and ishex(line[i+2:i+3]):
|
||||
new = new + bytes((unhex(line[i+1:i+3]),)); i = i+3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue