Skip to content

Commit

Permalink
Merge pull request #5 from coldfix/fix-logging
Browse files Browse the repository at this point in the history
Fix AttributeError: 'Sphinx' object has no attribute 'debug'
  • Loading branch information
Chilipp committed Apr 3, 2019
2 parents 3dee804 + 194ca30 commit d9a1a09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autodocsumm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
This extension gives also the possibility to choose which data shall be shown
and to include the docstring of the ``'__call__'`` attribute.
"""
import logging
import re
import six
import sphinx
Expand Down Expand Up @@ -57,6 +58,8 @@

sphinx_version = list(map(float, re.findall(r'\d+', sphinx.__version__)[:3]))

logger = logging.getLogger(__name__)


class AutosummaryDocumenter(object):
"""Abstract class for for extending Documenter methods
Expand Down Expand Up @@ -114,7 +117,7 @@ def get_grouped_documenters(self, all_members=False):
# be cached anyway)
self.analyzer.find_attr_docs()
except PycodeError as err:
self.env.app.debug('[autodoc] module analyzer failed: %s', err)
logger.debug('[autodoc] module analyzer failed: %s', err)
# no source file -- e.g. for builtin and C modules
self.analyzer = None
# at least add the module.__file__ as a dependency
Expand Down

0 comments on commit d9a1a09

Please sign in to comment.