From 4312c942d4deb2a9f226fdb0ff3851d2b311b16e Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Wed, 19 Mar 2008 19:36:03 +0000 Subject: [PATCH] Fix imports so mail functionality in glsa-check works with python versions less than 2.5 (Bug 211706) svn path=/; revision=485 --- trunk/ChangeLog | 4 ++++ trunk/src/glsa-check/glsa-check | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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() -- 2.26.2