When an extension fails to import, give the original traceback with -v

This commit is contained in:
Georg Brandl committed 2014-01-13 08:47:39 +01:00
1 parent d133f028af
commit 9756d3d339
1 file changed
+2
+2
View File
@@ -15,6 +15,7 @@ import os
import sys
import types
import posixpath
import traceback
from os import path
from cStringIO import StringIO
@@ -282,6 +283,7 @@ class Sphinx(object):
try:
mod = __import__(extension, None, None, ['setup'])
except ImportError, err:
self.verbose('Original exception:\n' + traceback.format_exc())
raise ExtensionError('Could not import extension %s' % extension,
err)
if not hasattr(mod, 'setup'):