Milter.utils.parse_header returns string, other py3 fixes
This commit is contained in:
+2
-1
@@ -216,7 +216,8 @@ def parse_header(val):
|
||||
u.append(s.decode())
|
||||
else:
|
||||
u.append(s.decode())
|
||||
u = u''.join(u)
|
||||
u = ''.join(u)
|
||||
if type(u) is str: return u
|
||||
for enc in ('us-ascii','iso-8859-1','utf-8'):
|
||||
try:
|
||||
return u.encode(enc)
|
||||
|
||||
Reference in New Issue
Block a user