From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 800059AB5 for ; Thu, 23 Jun 2016 08:14:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 22 Jun 2016 23:14:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="1003555688" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 22 Jun 2016 23:14:47 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u5N6EiqH006272; Thu, 23 Jun 2016 14:14:44 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u5N6Efop025702; Thu, 23 Jun 2016 14:14:43 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u5N6EaIv025698; Thu, 23 Jun 2016 14:14:36 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Thu, 23 Jun 2016 14:14:35 +0800 Message-Id: <1466662475-25666-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] framework dts: fix failure when no commands input from user X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2016 06:14:48 -0000 When parameter commands is not inputed by user, dts should skip handling the commands parameter. Signed-off-by: Marvin Liu 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