summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-10 21:01:24 +0100
committerGeorg Brandl <georg@python.org>2014-01-10 21:01:24 +0100
commit7a26dd07301b5e612c3368539ceb579af622167f (patch)
treed8993b720557ae54ddbcf9e8b54c2a73dcb6d022 /sphinx/ext/autodoc.py
parentfdb3a5ada81cb75cca25c60cff71b889b18b7652 (diff)
downloadsphinx-git-7a26dd07301b5e612c3368539ceb579af622167f.tar.gz
Closes #814: autodoc: Guard against strange type objects that don't have
``__bases__``.
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 67b6fe4ee..e26a6b85d 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -1052,7 +1052,7 @@ class ClassDocumenter(ModuleLevelDocumenter):
# add inheritance info, if wanted
if not self.doc_as_attr and self.options.show_inheritance:
self.add_line(u'', '<autodoc>')
- if len(self.object.__bases__):
+ if hasattr(self.object, '__bases__') and len(self.object.__bases__):
bases = [b.__module__ == '__builtin__' and
u':class:`%s`' % b.__name__ or
u':class:`%s.%s`' % (b.__module__, b.__name__)