Skip to content

Commit 01d67e3

Browse files
authored
Merge pull request #103 from ribozz/feature/fix102
Fix #102, be more explicit about why something can't be imported
2 parents 322b092 + 4135cb4 commit 01d67e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sphinxarg/ext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from argparse import ArgumentParser
23
import os
34

@@ -442,7 +443,7 @@ def run(self):
442443
try:
443444
mod = __import__(module_name, globals(), locals(), [attr_name])
444445
except:
445-
raise self.error('Failed to import "%s" from "%s"' % (attr_name, module_name))
446+
raise self.error('Failed to import "%s" from "%s".\n%s' % (attr_name, module_name, sys.exc_info()[1]))
446447

447448
if not hasattr(mod, attr_name):
448449
raise self.error((

0 commit comments

Comments
 (0)