Skip to content

Commit

Permalink
Use validate_dict for more accurate error messages (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
ba11b0y authored and agjohnson committed Sep 7, 2018
1 parent 8705717 commit 3501ca0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions readthedocs/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 3501ca0

Please sign in to comment.