diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-10 12:47:55 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-10 12:47:55 -0500 |
commit | be38478cd8e11b0e29c70bb881a676628e9f74d5 (patch) | |
tree | a7bae52849941b45dedef53175e2623fcf18481e /cloudinit/util.py | |
parent | b839ad32b9bf4541583ecbe68a0bd5dd9f12345a (diff) | |
download | vyos-cloud-init-be38478cd8e11b0e29c70bb881a676628e9f74d5.tar.gz vyos-cloud-init-be38478cd8e11b0e29c70bb881a676628e9f74d5.zip |
improve comment
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 1d50edc9..1a517c79 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -2145,13 +2145,12 @@ def _read_dmi_syspath(key): LOG.debug("%s did not return any data", dmi_key_path) return None - # in the event that this is all \xff and a carriage return - # then return '.' in its place. + # uninitialized dmi values show as all \xff and /sys appends a '\n'. + # in that event, return a string of '.' in the same length. if key_data == b'\xff' * (len(key_data) - 1) + b'\n': key_data = b'.' * (len(key_data) - 1) + b'\n' str_data = key_data.decode('utf8').strip() - LOG.debug("dmi data %s returned %s", dmi_key_path, str_data) return str_data |