From: Zhang Qiang Date: Fri, 3 Aug 2012 05:48:48 +0000 (+0800) Subject: conf: error handling if no no section headers X-Git-Tag: 0.9~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=267bd1abf092d43201dfb21f990a11263e9870a5;p=tools%2Fgbs.git conf: error handling if no no section headers --- diff --git a/gitbuildsys/conf.py b/gitbuildsys/conf.py index 3d9487d..8ce768b 100644 --- a/gitbuildsys/conf.py +++ b/gitbuildsys/conf.py @@ -293,7 +293,10 @@ distconf = $build__distconf self.replaced_keys = defaultdict(list) if fpaths: - self.cfgparser.read(fpaths) + try: + self.cfgparser.read(fpaths) + except MissingSectionHeaderError, err: + raise errors.ConfigError('config file error:%s' % err) self._check_passwd() def _lookfor_confs(self):