"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "68e24259af627d2e32b5f06e41c095a511b16aca"
Unverified Commit b2030a24 authored by Álvaro Somoza's avatar Álvaro Somoza Committed by GitHub
Browse files

Fix object has no attribute 'flush' when using without a console (#8271)

fix
parent 67bef202
...@@ -82,7 +82,9 @@ def _configure_library_root_logger() -> None: ...@@ -82,7 +82,9 @@ def _configure_library_root_logger() -> None:
# This library has already configured the library root logger. # This library has already configured the library root logger.
return return
_default_handler = logging.StreamHandler() # Set sys.stderr as stream. _default_handler = logging.StreamHandler() # Set sys.stderr as stream.
_default_handler.flush = sys.stderr.flush
if sys.stderr: # only if sys.stderr exists, e.g. when not using pythonw in windows
_default_handler.flush = sys.stderr.flush
# Apply our default configuration to the library root logger. # Apply our default configuration to the library root logger.
library_root_logger = _get_library_root_logger() library_root_logger = _get_library_root_logger()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment