Petar Marić  committed 3fe7ed0

It seems Python 2.5 changed the name of email.Utils stdlib module to email.utils, added fallback

  • Participants
  • Parent commits 9e86cf9

Comments (0)

Files changed (1)

File metaTED/

 import os
 import logging
-from email.utils import formatdate
 from jinja2 import Environment, PackageLoader
 from metaTED import __version__
 from metaTED.cache import cached_storage
 from metaTED.crawler.get_downloadable_talks import get_downloadable_talks
 from metaTED.crawler.get_talk_info import AVAILABLE_VIDEO_QUALITIES
+    from email.utils import formatdate
+except ImportError:
+    from email.Utils import formatdate # Python 2.4 fallback
 def _get_downloads(downloadable_talks, quality, group_by=None):
     downloads = []