[dts] [PATCH] raise exception when load execution file failed
Yong Liu
yong.liu at intel.com
Tue Sep 15 07:29:01 CEST 2015
From: Marvin Liu <yong.liu at intel.com>
Signed-off-by: Marvin Liu <yong.liu at intel.com>
diff --git a/framework/dts.py b/framework/dts.py
index 33ac542..d2ee015 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -51,7 +51,7 @@ from test_result import Result
from stats_reporter import StatsReporter
from excel_reporter import ExcelReporter
from utils import *
-from exception import TimeoutException
+from exception import TimeoutException, ConfigParseException
from logger import getLogger
import logger
import debugger
@@ -441,7 +441,9 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
# Read config file
config = ConfigParser.SafeConfigParser()
- config.read(config_file)
+ load_cfg = config.read(config_file)
+ if len(load_cfg) == 0:
+ raise ConfigParseException(config_file)
# register exit action
atexit.register(close_crb_sessions)
--
1.9.3
More information about the dts
mailing list