summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorXiaofeng Wang <xiaofengw@vmware.com>2019-10-17 15:18:44 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-17 15:18:44 +0000
commitecb501b84338f078be18c38c68c3ce87fed3584b (patch)
tree0861c97c0fcf444b4035795055f18cef161273e8 /cloudinit/sources
parenta86829d32284ea4842f13035442b1a5127997018 (diff)
downloadvyos-cloud-init-ecb501b84338f078be18c38c68c3ce87fed3584b.tar.gz
vyos-cloud-init-ecb501b84338f078be18c38c68c3ce87fed3584b.zip
guestcust_util: handle special characters in config file
Handle the special characters when reading VM Tools configure file. For example, the key and value may contain _, - and . etc.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/helpers/vmware/imc/guestcust_util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
index eb78172e..3d369d04 100644
--- a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
+++ b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
@@ -138,7 +138,7 @@ def get_tools_config(section, key, defaultVal):
try:
(outText, _) = util.subp(cmd)
- m = re.match(r'([a-zA-Z0-9 ]+)=(.*)', outText)
+ m = re.match(r'([^=]+)=(.*)', outText)
if m:
retValue = m.group(2).strip()
logger.debug("Get tools config: [%s] %s = %s",