mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#238: In autodoc, catch all errors that occur on module import,
not just ``ImportError``.
This commit is contained in:
parent
598f2dda3a
commit
b9253e348b
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
Release 0.6.4 (in development)
|
||||
==============================
|
||||
|
||||
* #238: In autodoc, catch all errors that occur on module import,
|
||||
not just ``ImportError``.
|
||||
|
||||
* Fix the handling of non-data, but non-method descriptors in autodoc.
|
||||
|
||||
* When copying file times, ignore OSErrors raised by ``os.utime()``.
|
||||
|
@ -322,7 +322,9 @@ class Documenter(object):
|
||||
obj = self.get_attr(obj, part)
|
||||
self.object = obj
|
||||
return True
|
||||
except (SyntaxError, ImportError, AttributeError), err:
|
||||
# this used to only catch SyntaxError, ImportError and AttributeError,
|
||||
# but importing modules with side effects can raise all kinds of errors
|
||||
except Exception, err:
|
||||
self.directive.warn(
|
||||
'autodoc can\'t import/find %s %r, it reported error: '
|
||||
'"%s", please check your spelling and sys.path' %
|
||||
|
Loading…
Reference in New Issue
Block a user