mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Import can raise SyntaxError as well, e.g. for invalid encodings.
This commit is contained in:
@@ -330,7 +330,7 @@ class Documenter(object):
|
||||
obj = self.get_attr(obj, part)
|
||||
self.object = obj
|
||||
return True
|
||||
except (ImportError, AttributeError), err:
|
||||
except (SyntaxError, ImportError, AttributeError), err:
|
||||
self.directive.warn(
|
||||
'autodoc can\'t import/find %s %r, it reported error: '
|
||||
'"%s", please check your spelling and sys.path' %
|
||||
|
||||
Reference in New Issue
Block a user