From f2f1ddb4a30ce04720e99a44f241748d3c7acd2b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 22 Apr 2019 14:05:57 -0400 Subject: [PATCH] Ignore blank numeric default Some settings that are numeric show a default of ''. Such a default is not usable. Treat such a situation as a default not existing. Change-Id: Id3931da7128a732f62863055a93117a3abd05805 --- pyghmi/ipmi/oem/lenovo/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 48f515a3..a57200b9 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -331,6 +331,8 @@ class LenovoFirmwareConfig(object): else: current = instance.text default = onedata.get('default', None) + if default == '': + default = None if (setting.find('cmd_data') is not None or setting.find('boolean_data') is not None): protect = True # Hide currently unsupported settings