From 001057f01e698c3ca0c078d9535f05fdebec2d80 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 14 Mar 2016 09:34:46 -0400 Subject: strip return of dmidecode and do so before checking for all "." --- cloudinit/util.py | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3