diff options
| author | Brian Potchik <brian@vector35.com> | 2020-11-06 15:19:01 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2020-11-06 15:19:01 -0500 |
| commit | bbec694624d4d8bb127864f1794c6466746f3aa8 (patch) | |
| tree | 1c10f58c928ea3fe732f8af90f242d1db056becc /python/__init__.py | |
| parent | 7f7244419b3776f69ad2140995299eef3f6a3257 (diff) | |
Fix python headless default log initialization.
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/__init__.py b/python/__init__.py index 167fedc7..85a602c4 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -166,11 +166,11 @@ def _init_plugins(): global _plugin_init if not _plugin_init: # The first call to BNInitCorePlugins returns True for successful initialization and True in this context indicates headless operation. - is_headless = not core.BNIsUIEnabled() + # The result is pulled from BNInitPlugins as that now wraps BNInitCorePlugins. + is_headless_init_once = core.BNInitPlugins(not os.environ.get('BN_DISABLE_USER_PLUGINS')) min_level = Settings().get_string("python.log.minLevel") - if _enable_default_log and is_headless and min_level in LogLevel.__members__ and not core_ui_enabled() and sys.stderr.isatty(): + if _enable_default_log and is_headless_init_once and min_level in LogLevel.__members__ and not core_ui_enabled() and sys.stderr.isatty(): log_to_stderr(LogLevel[min_level]) - core.BNInitPlugins(not os.environ.get('BN_DISABLE_USER_PLUGINS')) core.BNInitRepoPlugins() if core.BNIsLicenseValidated(): _plugin_init = True |
