import unittest if cannot found unittest2

This commit is contained in:
Jiachen Yang 2012-02-28 01:43:36 +09:00
commit e78372f338
4 changed files with 17 additions and 6 deletions

View file

@ -1,5 +1,8 @@
from __future__ import with_statement
from unittest2 import TestCase
try:
from unittest2 import TestCase
except ImportError, e:
from unittest import TestCase
from pelican.contents import Page
from pelican.settings import _DEFAULT_CONFIG