From 85d70ec62cddedc9c2d48bf44d280af266ac0c7f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 29 Jul 2016 01:12:27 +0300 Subject: [PATCH] Use raise Exception() for Python 3 compatibility --- mimedecode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mimedecode.py b/mimedecode.py index c30c8e6..8c18c6a 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -373,7 +373,7 @@ def decode_part(msg): for content_type in masks: if content_type in g.error_mask: - raise ValueError, "content type %s prohibited" % ctype + raise ValueError("content type %s prohibited" % ctype) def decode_multipart(msg): "Decode multipart" @@ -427,7 +427,7 @@ def decode_multipart(msg): for content_type in masks: if content_type in g.error_mask: - raise ValueError, "content type %s prohibited" % ctype + raise ValueError("content type %s prohibited" % ctype) output_headers(msg) -- 2.39.2