From 32c238641ee82fff8e965cf21c9f36378040aafa Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 7 Mar 2019 20:02:22 -0500 Subject: [PATCH] Fix reraise of exception We were hiding the real error from the user Related https://github.com/rtfd/readthedocs.org/issues/4745#issuecomment-470754025 --- readthedocs/doc_builder/backends/sphinx.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/readthedocs/doc_builder/backends/sphinx.py b/readthedocs/doc_builder/backends/sphinx.py index c5a664835fa..2b1ad550f60 100644 --- a/readthedocs/doc_builder/backends/sphinx.py +++ b/readthedocs/doc_builder/backends/sphinx.py @@ -176,11 +176,10 @@ def append_conf(self, **__): self.config_file or self.project.conf_file(self.version.slug) ) outfile = codecs.open(self.config_file, encoding='utf-8', mode='a') - except (ProjectConfigurationError, IOError): - trace = sys.exc_info()[2] + except IOError: raise ProjectConfigurationError( - ProjectConfigurationError.NOT_FOUND, - ).with_traceback(trace) + ProjectConfigurationError.NOT_FOUND + ) # Append config to project conf file tmpl = template_loader.get_template('doc_builder/conf.py.tmpl')