summaryrefslogtreecommitdiffstats
path: root/Lib/quopri.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-20 14:48:02 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-20 14:48:02 (GMT)
commitee4c0b9dcfb550094cca086a032d44393b5c3642 (patch)
treec04129c6917ab6ea583c417066b03afb81828552 /Lib/quopri.py
parent000391b7de634635b493b680f14b907d767d8583 (diff)
parent74a49ac3f5ac3c7a09c691db4888c981a0cb3232 (diff)
downloadcpython-ee4c0b9dcfb550094cca086a032d44393b5c3642.zip
cpython-ee4c0b9dcfb550094cca086a032d44393b5c3642.tar.gz
cpython-ee4c0b9dcfb550094cca086a032d44393b5c3642.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-xLib/quopri.py2
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