From 52209d8f05a856c2c5cab3e33fedf3a205830726 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Thu, 2 Oct 2014 15:18:40 +0200 Subject: [PATCH] Fix py3 compatibility the ini.get() thing is weird between python2 and python3 but it seems that the fourth argument is unnecessary and not implemented in py3 anyway. Change-Id: Ic42c3ca144ee9dd1aab372bc7d70bdca34cb7a93 --- dox/config/tox_ini.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dox/config/tox_ini.py b/dox/config/tox_ini.py index aed83f0..c78125b 100644 --- a/dox/config/tox_ini.py +++ b/dox/config/tox_ini.py @@ -13,9 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import ConfigParser + import os +from six.moves.configparser import ConfigParser + import dox.config.base as base @@ -40,7 +42,7 @@ class ToxIni(base.ConfigBase): def _open_tox_ini(self): if self._ini is None: - self._ini = ConfigParser.ConfigParser() + self._ini = ConfigParser() self._ini.read(self.tox_ini_file) return self._ini @@ -53,7 +55,7 @@ class ToxIni(base.ConfigBase): def get_images(self): ini = self._open_tox_ini() if ini.has_option('docker', 'images'): - return ini.get('docker', 'images', '').split(',') + return ini.get('docker', 'images').split(',') def get_commands(self, extra_args, section='testenv'): """Get commands to run from the config file.