[PATCH] models: Fix HeaderParser import on python 2.4

Jeremy Kerr jk at ozlabs.org
Wed Nov 3 04:27:44 EST 2010


We need to add an import for HeaderParser on python 2.4; email.Parser
appears to contain the right stuff.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---
 apps/patchwork/models.py |    1 +
 1 file changed, 1 insertion(+)

diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py
index edb52df..6842622 100644
--- a/apps/patchwork/models.py
+++ b/apps/patchwork/models.py
@@ -38,6 +38,7 @@ except ImportError:
     # Python 2.4 compatibility
     from email.MIMENonMultipart import MIMENonMultipart
     from email.Encoders import encode_7or8bit
+    from email.Parser import HeaderParser
     import email.Utils
     email.utils = email.Utils
 


More information about the Patchwork mailing list