From c4bb38d2b1b69c8bdafd8df1e03889ec0c85b555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 31 Jul 2019 18:53:11 +0200 Subject: [PATCH] vcenter: disable ConfigParser interpolation (#59851) Password can come with the '%' character. If we keep ConfigParser interpolation enabled, it will try to modify the value. Typical error looks like this one: ``` configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%Z,sq' ``` See: https://docs.python.org/3/library/configparser.html#interpolation-of-values --- test/runner/lib/cloud/vcenter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runner/lib/cloud/vcenter.py b/test/runner/lib/cloud/vcenter.py index 17254357bfb..c12368d047c 100644 --- a/test/runner/lib/cloud/vcenter.py +++ b/test/runner/lib/cloud/vcenter.py @@ -267,12 +267,12 @@ class VcenterEnvironment(CloudEnvironment): # Most of the test cases use ansible_vars, but we plan to refactor these # to use env_vars, output both for now env_vars = dict( - (key.upper(), value) for key, value in parser.items('DEFAULT')) + (key.upper(), value) for key, value in parser.items('DEFAULT', raw=True)) ansible_vars = dict( resource_prefix=self.resource_prefix, ) - ansible_vars.update(dict(parser.items('DEFAULT'))) + ansible_vars.update(dict(parser.items('DEFAULT', raw=True))) else: env_vars = dict(