Adding an exception handler around the unittest import.

original-commit-id: 4de0c12b438cf99e90070e723508ce636278e063
This commit is contained in:
C Nelson 2012-04-06 11:54:48 -05:00
parent 76aab69763
commit 721751dd57

View File

@ -11,7 +11,10 @@ from bisect import bisect_left, bisect_right
from itertools import izip
#for testing all this crap
import unittest2 as unittest
try:
import unittest2 as unittest
except ImportError:
import unittest
if not hasattr(json, "dumps"):
json.dumps = json.write