[dts] [PATCH] framework dts: fix failure when no commands input from user
Marvin Liu
yong.liu at intel.com
Thu Jun 23 08:14:35 CEST 2016
When parameter commands is not inputed by user, dts should skip handling
the commands parameter.
Signed-off-by: Marvin Liu <yong.liu at intel.com>
diff --git a/framework/dts.py b/framework/dts.py
index 06e2952..611c0dc 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -189,6 +189,9 @@ def dts_parse_commands(commands):
"""
Parse command information from dts arguments
"""
+ if commands is None:
+ return
+
args_format = {"shell": 0,
"crb": 1,
"stage": 2,
@@ -196,6 +199,7 @@ def dts_parse_commands(commands):
"max_num": 4}
global dts_commands
cmd_fmt = r"\[(.*)\]"
+
for command in commands:
args = command.split(':')
if len(args) != args_format['max_num']:
--
1.9.3
More information about the dts
mailing list