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