From d5066073a7b191290ade1ec432b37cef00f22aa8 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Mon, 29 Aug 2016 13:07:15 +0700 Subject: [PATCH] Python 3.x compatibility ConfigParser OpenStack code should become Python 3.x compatible: http://docs.openstack.org/developer/hacking/#python-3-x-compatibility Following table contains the renamings and reorganizations of the standard library using six.moves: http://python3porting.com/stdlib.html#removed-modules Change-Id: I809dfa041fd1ec14df563499685357a1b901ae21 --- devstack/exercise_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack/exercise_common.sh b/devstack/exercise_common.sh index 21790e373..a1bd262cc 100644 --- a/devstack/exercise_common.sh +++ b/devstack/exercise_common.sh @@ -287,7 +287,7 @@ function get_ini { local option=${3:?option not specified} cat <<_GET_INI | python - -import ConfigParser +from six.moves import configparser as ConfigParser cp = ConfigParser.ConfigParser() cp.read("$file") assert "$section" in cp.sections(), '$section not in $file'