From 3501ca08db9372877a071a8f97ff93a5ac5cc694 Mon Sep 17 00:00:00 2001 From: Rahul Tiwari Date: Fri, 7 Sep 2018 23:04:19 +0530 Subject: [PATCH] Use validate_dict for more accurate error messages (#4617) --- readthedocs/config/config.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/readthedocs/config/config.py b/readthedocs/config/config.py index 88711d49b19..251c786ec82 100644 --- a/readthedocs/config/config.py +++ b/readthedocs/config/config.py @@ -438,12 +438,8 @@ def validate_conda(self): if 'conda' in self.raw_config: raw_conda = self.raw_config['conda'] - if not isinstance(raw_conda, dict): - self.error( - 'conda', - self.PYTHON_INVALID_MESSAGE, - code=PYTHON_INVALID) - + with self.catch_validation_error('conda'): + validate_dict(raw_conda) conda_environment = None if 'file' in raw_conda: with self.catch_validation_error('conda.file'):