diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-07-19 17:38:54 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-07-24 18:03:22 -0400 |
| commit | 0368556296622756576449861940973500592131 (patch) | |
| tree | 5e40258a0def001a56943455152433855fc613a3 /python | |
| parent | 892a0729a587d3a4e8ac248e4eee8a73c7ccc5d1 (diff) | |
Fix every call to _init_plugins() causing a license checkout
Diffstat (limited to 'python')
| -rw-r--r-- | python/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/__init__.py b/python/__init__.py index 144e2643..3104e14a 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -224,12 +224,12 @@ def _init_plugins(): global _plugin_init global _enterprise_license_checkout - if not core_ui_enabled() and core.BNGetProduct() == "Binary Ninja Enterprise Client": - # Enterprise client needs to checkout a license reservation or else BNInitPlugins will fail - _enterprise_license_checkout = enterprise.LicenseCheckout() - _enterprise_license_checkout.acquire() - if not _plugin_init: + if not core_ui_enabled() and core.BNGetProduct() == "Binary Ninja Enterprise Client": + # Enterprise client needs to checkout a license reservation or else BNInitPlugins will fail + _enterprise_license_checkout = enterprise.LicenseCheckout() + _enterprise_license_checkout.acquire() + # The first call to BNInitCorePlugins returns True for successful initialization and True in this context indicates headless operation. # 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')) |
