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
This commit is contained in:
@@ -287,7 +287,7 @@ function get_ini {
|
|||||||
local option=${3:?option not specified}
|
local option=${3:?option not specified}
|
||||||
|
|
||||||
cat <<_GET_INI | python -
|
cat <<_GET_INI | python -
|
||||||
import ConfigParser
|
from six.moves import configparser as ConfigParser
|
||||||
cp = ConfigParser.ConfigParser()
|
cp = ConfigParser.ConfigParser()
|
||||||
cp.read("$file")
|
cp.read("$file")
|
||||||
assert "$section" in cp.sections(), '$section not in $file'
|
assert "$section" in cp.sections(), '$section not in $file'
|
||||||
|
|||||||
Reference in New Issue
Block a user