Message218618
Lib/quopri.py for version 3.3..3.5-tip contains following code:
ESCAPE = b'='
...
line = input.readline()
if not line: break
i, n = 0, len(line)
if n > 0 and line[n-1:n] == b'\n':
...
elif i+1 < n and line[i+1] == ESCAPE:
So, ESCAPE is defined as bytes, we see that "line" is read as bytes, and characters are accessed using idiom like "line[n-1:n]", but then it uses "line[i+1]", which returns int and thus will never be equal to ESCAPE.
I'm not sure what exact semantic condition that branch represents, for me it looks like "==" sequence to be decoded as "=". But I don't see such encoding variant in http://en.wikipedia.org/wiki/Quoted-printable . Either way, replacing that condition with "and False", still passes test_quopri.py |
|
Date |
User |
Action |
Args |
2014-05-15 16:37:35 | pfalcon | set | recipients:
+ pfalcon |
2014-05-15 16:37:35 | pfalcon | set | messageid: <1400171855.37.0.067918723363.issue21511@psf.upfronthosting.co.za> |
2014-05-15 16:37:35 | pfalcon | link | issue21511 messages |
2014-05-15 16:37:34 | pfalcon | create | |
|