summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 519c40f78..66f7952c2 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -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' %