Fix python 2,3 compatibility issue with six
ConfigParser is available in python2 but not in python3. ref:http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html Change-Id: I4e75ebb945de4b37c39cc73f7f1472a69ef72ea9
This commit is contained in:
parent
5ff2902456
commit
cc6328793f
|
@ -21,10 +21,11 @@
|
|||
Installation script for python-muranoclient's development virtualenv
|
||||
"""
|
||||
|
||||
import ConfigParser
|
||||
import os
|
||||
import sys
|
||||
|
||||
from six.moves import configparser
|
||||
|
||||
import install_venv_common as install_venv
|
||||
|
||||
|
||||
|
@ -58,7 +59,7 @@ def main(argv):
|
|||
pip_requires = os.path.join(root, 'requirements.txt')
|
||||
test_requires = os.path.join(root, 'test-requirements.txt')
|
||||
py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
setup_cfg = ConfigParser.ConfigParser()
|
||||
setup_cfg = configparser.ConfigParser()
|
||||
setup_cfg.read('setup.cfg')
|
||||
project = setup_cfg.get('metadata', 'name')
|
||||
|
||||
|
|
Loading…
Reference in New Issue