More email package fixes.

Fix a couple of tests since .body_encode()'s arguments have changed.  Also, I
think body_encode() should take a string not a byte array for consistency with
the rest of the api (but I'm not positive about this).  In
quoprimime.body_encode(), body_check() must be passed an int.

Current status: 7F (no errors!)
This commit is contained in:
Barry Warsaw 2007-08-31 03:26:19 +00:00
parent 0616b792ba
commit 7aa02e6590
2 changed files with 9 additions and 10 deletions

View file

@ -189,7 +189,7 @@ def body_encode(body, maxlinelen=76, eol=NL):
for j in range(linelen):
c = line[j]
prev = c
if body_check(c):
if body_check(ord(c)):
c = quote(c)
elif j+1 == linelen:
# Check for whitespace at end of line; special case