Adding an exception handler around the unittest import.

This commit is contained in:
C Nelson 2012-04-06 11:54:48 -05:00
parent 7b3b1f11b2
commit 4de0c12b43

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