summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorbhagyashris <bhagyashri.shewale@nttdata.com>2016-06-21 20:08:45 +0530
committerbhagyashris <bhagyashri.shewale@nttdata.com>2016-06-21 20:14:26 +0530
commit42d2a33fb40bd17fd848c04bb1630791395b701f (patch)
tree657f5ecade39cf8d2958d236f448383dd0dc29af /tools
parent835747d40fb64bbf78bb331cda0ecf5cdd16de84 (diff)
downloadpython-cinderclient-42d2a33fb40bd17fd848c04bb1630791395b701f.tar.gz
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: Icf47e18c31a6fabf3584aead054ebd4c669a2574
Diffstat (limited to 'tools')
-rw-r--r--tools/install_venv.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 1dab63e..795c2eb 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -18,10 +18,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import ConfigParser
import os
import sys
+from six.moves import configparser
+
import install_venv_common as install_venv
@@ -57,7 +58,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')