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,4 +1,8 @@
import unittest2
try:
import unittest2
except ImportError, e:
import unittest as unittest2
from os.path import dirname, abspath, join
from pelican.settings import read_settings, _DEFAULT_CONFIG