From: fuzzyray Date: Wed, 19 Mar 2008 19:36:03 +0000 (-0000) Subject: Fix imports so mail functionality in glsa-check works with python versions less than... X-Git-Tag: gentoolkit-0.2.4.3~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4312c942d4deb2a9f226fdb0ff3851d2b311b16e;p=gentoolkit.git Fix imports so mail functionality in glsa-check works with python versions less than 2.5 (Bug 211706) svn path=/; revision=485 --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index fd06cbb..9bad1fe 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2008-03-19: Paul Varner + * glsa-check: Fix imports so mail functionality in glsa-check works + with python versions less than 2.5 (Bug 211706) + 2008-03-13: Paul Varner * euse: Add --info-installed option from patch provided by Andreas Waidler. (Bug 212573) diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check index 241d3cb..98e5708 100644 --- a/trunk/src/glsa-check/glsa-check +++ b/trunk/src/glsa-check/glsa-check @@ -313,8 +313,11 @@ if mode == "mail": import socket from StringIO import StringIO - from email.mime.text import MIMEText - + try: + from email.mime.text import MIMEText + except ImportError: + from email.MIMEText import MIMEText + # color doesn't make any sense for mail nocolor()