Skip to content

Commit 7355927

Browse files
authored
Merge pull request #2634 from rtfd/fix-conf-error
Fix issue where we can't find conf.py and raise bad error.
2 parents ae67af4 + 53f2179 commit 7355927

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/doc_builder/backends/sphinx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def append_conf(self, **kwargs):
6565

6666
project = self.project
6767
# Open file for appending.
68-
outfile_path = project.conf_file(self.version.slug)
6968
try:
69+
outfile_path = project.conf_file(self.version.slug)
7070
outfile = codecs.open(outfile_path, encoding='utf-8', mode='a')
71-
except IOError:
71+
except (ProjectImportError, IOError):
7272
trace = sys.exc_info()[2]
7373
raise ProjectImportError('Conf file not found'), None, trace
7474
try:

0 commit comments

Comments
 (0)