2to3; ordereddict fallback was for python2.6
parent
dbb3883516
commit
9bc5b0c7f7
|
@ -21,10 +21,15 @@ json.encoder.c_make_encoder = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
except ImportError:
|
||||||
|
# python < 2.7
|
||||||
|
from ordereddict import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from urllib2 import urlopen
|
from urllib2 import urlopen
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ordereddict import OrderedDict
|
# python > 3
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue