Make OpenCafe py2.6 compatible
This patch updates the OrderedDict import to be python 2.6 compatible. This is needed for downstream projects that use Open Cafe and need to run with older versions of python. Change-Id: I1d6ae1ee6d214adca8333d2f469a1366890ceaa7
This commit is contained in:
parent
179b992aba
commit
2416f8acd8
@ -17,7 +17,11 @@ limitations under the License.
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
# python 2.6 or earlier, use backport
|
||||
from ordereddict import OrderedDict
|
||||
|
||||
log = logging.getLogger('RunnerLog')
|
||||
|
||||
|
@ -1 +1 @@
|
||||
six
|
||||
six
|
||||
|
2
setup.py
2
setup.py
@ -52,7 +52,7 @@ requires = open('pip-requires').readlines()
|
||||
|
||||
# Add additional requires for Python 2.6 support
|
||||
if sys.version_info < (2, 7):
|
||||
oldpy_requires = ['argparse>=1.2.1', 'unittest2>=0.5.1']
|
||||
oldpy_requires = ['argparse>=1.2.1', 'unittest2>=0.5.1', 'ordereddict']
|
||||
requires.extend(oldpy_requires)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user