summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-14 09:34:46 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-14 09:34:46 -0400
commit001057f01e698c3ca0c078d9535f05fdebec2d80 (patch)
tree8eaa28c07288f57bd588ecd39302c087d7685eb9
parentf8fe3182ac5e6b7b3b4a81e034e87bfd1327f82b (diff)
downloadvyos-cloud-init-001057f01e698c3ca0c078d9535f05fdebec2d80.tar.gz
vyos-cloud-init-001057f01e698c3ca0c078d9535f05fdebec2d80.zip
strip return of dmidecode and do so before checking for all "."
-rw-r--r--cloudinit/util.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index f84f120e..f9e37a79 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -2168,6 +2168,7 @@ def _call_dmidecode(key, dmidecode_path):
cmd = [dmidecode_path, "--string", key]
(result, _err) = subp(cmd)
LOG.debug("dmidecode returned '%s' for '%s'", result, key)
+ result = result.strip()
if result.replace(".", "") == "":
return ""
return result