diff options
Diffstat (limited to 'sphinx/ext/coverage.py')
-rw-r--r-- | sphinx/ext/coverage.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 8e3ac1ae3..78281bb85 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -6,7 +6,7 @@ Check Python modules and C API for coverage. Mostly written by Josip Dzolonga for the Google Highly Open Participation contest. - :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,6 +20,7 @@ from six.moves import cPickle as pickle import sphinx from sphinx.builders import Builder +from sphinx.util.inspect import safe_getattr # utility @@ -187,7 +188,10 @@ class CoverageBuilder(Builder): for attr_name in dir(obj): if attr_name not in obj.__dict__: continue - attr = getattr(obj, attr_name) + try: + attr = safe_getattr(obj, attr_name) + except AttributeError: + continue if not (inspect.ismethod(attr) or inspect.isfunction(attr)): continue |