Skip to content

Commit

Permalink
Merge pull request #3326 from rtfd/humitos/confpy/better-error
Browse files Browse the repository at this point in the history
Show proper error to user when conf.py is not found
  • Loading branch information
ericholscher authored Dec 21, 2017
2 parents a84b5ed + 21d63bb commit e0c5658
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 60 deletions.
9 changes: 9 additions & 0 deletions readthedocs/projects/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
"""Project exceptions."""

from __future__ import division, print_function, unicode_literals

from django.conf import settings
from django.utils.translation import ugettext_noop as _

Expand All @@ -15,6 +18,12 @@ class ProjectConfigurationError(BuildEnvironmentError):
'Make sure you have a conf.py file in your repository.'
)

MULTIPLE_CONF_FILES = _(
'We found more than one conf.py and are not sure which one to use. '
'Please, specify the correct file under the Advanced settings tab '
"in the project's Admin."
)


class RepositoryError(BuildEnvironmentError):

Expand Down
Loading

0 comments on commit e0c5658

Please sign in to comment.