test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework dts: fix failure when no commands input from user
@ 2016-06-23  6:14 Marvin Liu
  0 siblings, 0 replies; only message in thread
From: Marvin Liu @ 2016-06-23  6:14 UTC (permalink / raw)
  To: dts; +Cc: Marvin Liu

When parameter commands is not inputed by user, dts should skip handling
the commands parameter.

Signed-off-by: Marvin Liu <yong.liu@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-23  6:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23  6:14 [dts] [PATCH] framework dts: fix failure when no commands input from user Marvin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).