import base64
import shutil
from ConfigParser import SafeConfigParser, NoSectionError, NoOptionError, \
- MissingSectionHeaderError
+ MissingSectionHeaderError, Error
from gitbuildsys import msger, errors
from gitbuildsys.safe_url import SafeURL
cfgparser = BrainConfigParser()
try:
cfgparser.read_one(fpath)
- except MissingSectionHeaderError, err:
+ except Error, err:
raise errors.ConfigError('config file error:%s' % err)
self._cfgparsers.append(cfgparser)
self._check_passwd()
'test invalid ini'
self.assertRaises(ConfigError, reload, gitbuildsys.conf)
+ @Fixture(home='invalid_continuation_line.ini')
+ def test_invalid_continuation_line(self):
+ 'test invalid cointinuation line'
+ self.assertRaises(ConfigError, reload, gitbuildsys.conf)
+
if __name__ == '__main__':
unittest.main()
\ No newline at end of file