Fix imports so mail functionality in glsa-check works with python versions less than...
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 19 Mar 2008 19:36:03 +0000 (19:36 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 19 Mar 2008 19:36:03 +0000 (19:36 -0000)
svn path=/; revision=485

trunk/ChangeLog
trunk/src/glsa-check/glsa-check

index fd06cbbef1b4925f15936c6cb1d7024164af6584..9bad1fec8d5c03a7008819636523160dd1ea59ce 100644 (file)
@@ -1,3 +1,7 @@
+2008-03-19: Paul Varner <fuzzyray@gentoo.org>
+       * 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 <fuzzyray@gentoo.org>
        * euse: Add --info-installed option from patch provided by Andreas
        Waidler. (Bug 212573)
index 241d3cb5b547bf80094c4a33b37dc1598eb15b08..98e5708154ff7450e897527502aedb15ec951126 100644 (file)
@@ -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()