From: Oleg Broytman Date: Thu, 28 Jul 2016 22:12:27 +0000 (+0300) Subject: Use raise Exception() for Python 3 compatibility X-Git-Tag: 2.7.0~38 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;h=85d70ec62cddedc9c2d48bf44d280af266ac0c7f;p=mimedecode.git Use raise Exception() for Python 3 compatibility --- 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)