Move definitions around to woark around a pypy3.8 bug.

This commit is contained in:
Andrey Rakhmatullin 2023-08-07 00:21:06 +04:00
parent 644a71bfd4
commit 23af21491d
1 changed files with 3 additions and 3 deletions

View File

@ -122,6 +122,9 @@ def configure_logging(
install_scrapy_root_handler(settings)
_scrapy_root_handler: Optional[logging.Handler] = None
def install_scrapy_root_handler(settings: Settings) -> None:
global _scrapy_root_handler
@ -139,9 +142,6 @@ def get_scrapy_root_handler() -> Optional[logging.Handler]:
return _scrapy_root_handler
_scrapy_root_handler: Optional[logging.Handler] = None
def _get_handler(settings: Settings) -> logging.Handler:
"""Return a log handler object according to settings"""
filename = settings.get("LOG_FILE")