diff options
author | Andrea Corbellini <corbellini.andrea@gmail.com> | 2012-07-11 11:49:29 +0200 |
---|---|---|
committer | Andrea Corbellini <corbellini.andrea@gmail.com> | 2012-07-11 11:49:29 +0200 |
commit | fbb2378a737ef91ea4777fcf45a7b28b994884ef (patch) | |
tree | b366a714d8515470c919b3b4a93b63565de4bbae /nose/config.py | |
parent | a6894e0d23afc3afeb921620a2b61ebf6bbea5c8 (diff) | |
download | nose-fbb2378a737ef91ea4777fcf45a7b28b994884ef.tar.gz |
Suppress tracebacks caused by ConfigErrors.
Show a kind error message instead of a traceback
when an unknown configuration variable is found in
a file.
Diffstat (limited to 'nose/config.py')
-rw-r--r-- | nose/config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nose/config.py b/nose/config.py index e110b7a..936721a 100644 --- a/nose/config.py +++ b/nose/config.py @@ -129,7 +129,10 @@ class ConfiguredDefaultsOptionParser(object): except ConfigError, exc: self._error(str(exc)) else: - self._applyConfigurationToValues(self._parser, config, values) + try: + self._applyConfigurationToValues(self._parser, config, values) + except ConfigError, exc: + self._error(str(exc)) return self._parser.parse_args(args, values) |