test/py: fix printenv signon message disable code
CONFIG_VERSION_VARIABLE isn't always defined, so we can't simply look up
its value directly, or an exception will occur if it isn't defined.
Instead, we must use .get() to supply a default value if the variable
isn't defined.
Fixes: da37f006e7
("tests: py: disable main_signon check for printenv cmd")
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
6beacfcff8
commit
7a8f886558
|
@ -39,7 +39,8 @@ class StateTestEnv(object):
|
|||
Nothing.
|
||||
"""
|
||||
|
||||
if self.u_boot_console.config.buildconfig['config_version_variable'] == 'y':
|
||||
if self.u_boot_console.config.buildconfig.get(
|
||||
'config_version_variable', 'n') == 'y':
|
||||
with self.u_boot_console.disable_check('main_signon'):
|
||||
response = self.u_boot_console.run_command('printenv')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue