diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-20 14:46:19 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-20 14:46:19 (GMT) |
commit | 74a49ac3f5ac3c7a09c691db4888c981a0cb3232 (patch) | |
tree | fda01f4cbce74bb51529a4d05d0b954988607932 /Lib/quopri.py | |
parent | d83b7c2df4439b678bf7e372f8c9bbaff2907689 (diff) | |
download | cpython-74a49ac3f5ac3c7a09c691db4888c981a0cb3232.zip cpython-74a49ac3f5ac3c7a09c691db4888c981a0cb3232.tar.gz cpython-74a49ac3f5ac3c7a09c691db4888c981a0cb3232.tar.bz2 |
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
Diffstat (limited to 'Lib/quopri.py')
-rwxr-xr-x | Lib/quopri.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/quopri.py b/Lib/quopri.py index 46c2a4c..cbd979a 100755 --- a/Lib/quopri.py +++ b/Lib/quopri.py @@ -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 |