From e37deca380e5a57508cf799cc90a20e1223deb60 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 4 Apr 2018 20:39:08 +0300 Subject: [PATCH] config: don't forget to specify the cause exception Signed-off-by: Ruslan Kuprieiev --- dvc/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/config.py b/dvc/config.py index 3b713e1ba..3975a3d20 100644 --- a/dvc/config.py +++ b/dvc/config.py @@ -10,8 +10,8 @@ from dvc.exceptions import DvcException class ConfigError(DvcException): """ DVC config exception """ - def __init__(self, msg): - DvcException.__init__(self, 'Config file error: {}'.format(msg)) + def __init__(self, ex=None): + DvcException.__init__(self, 'Config file error', ex) class Config(object): @@ -71,7 +71,7 @@ class Config(object): self._config = self._lower(self._config) self._config = schema.Schema(self.SCHEMA).validate(self._config) except Exception as ex: - raise ConfigError(ex.message) + raise ConfigError(ex) @staticmethod def _lower(config):