From 34ad6ae1312194ecb89c3ec482f888b8bd05754a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 13 Mar 2014 04:00:59 +0400 Subject: [PATCH] Inline recode --- mimedecode.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mimedecode.py b/mimedecode.py index 1006fb4..e63aedc 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -34,12 +34,9 @@ def output_headers(msg): output("\n") # End of headers -def recode(s, charset): - return unicode(s, charset, "replace").encode(g.default_encoding, "replace") - def recode_if_needed(s, charset): if charset and charset.lower() <> g.default_encoding: - s = recode(s, charset) + s = unicode(s, charset, "replace").encode(g.default_encoding, "replace") return s -- 2.39.5