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:
Luong Anh Tuan
2016-08-29 13:07:15 +07:00
parent 036fb5103d
commit d5066073a7

View File

@@ -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'