diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-16 09:57:54 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-16 09:57:54 +0900 |
commit | e7e07fd69723c02d6b011142f5e97fe2d42bd7d9 (patch) | |
tree | 1fe9194dd4115ed070212641ecc46e7d8846d13d /sphinx/util/logging.py | |
parent | 25678f391d55a701b7d5f2d2e214db980dcebbd3 (diff) | |
parent | be2b86cc15a2f5fca1581c25ebf2db9a189dbc41 (diff) | |
download | sphinx-git-e7e07fd69723c02d6b011142f5e97fe2d42bd7d9.tar.gz |
Merge branch '1.8'
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r-- | sphinx/util/logging.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index e7aecdc97..a5bd7cd05 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -153,7 +153,7 @@ class SphinxLoggerAdapter(logging.LoggerAdapter): def handle(self, record): # type: (logging.LogRecord) -> None - self.logger.handle(record) # type: ignore + self.logger.handle(record) class WarningStreamHandler(logging.StreamHandler): @@ -411,7 +411,8 @@ class SphinxLogRecordTranslator(logging.Filter): def filter(self, record): # type: ignore # type: (SphinxWarningLogRecord) -> bool if isinstance(record, logging.LogRecord): - record.__class__ = self.LogRecordClass # force subclassing to handle location + # force subclassing to handle location + record.__class__ = self.LogRecordClass # type: ignore location = getattr(record, 'location', None) if isinstance(location, tuple): |