From 0368556296622756576449861940973500592131 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Fri, 19 Jul 2024 17:38:54 -0400 Subject: Fix every call to _init_plugins() causing a license checkout --- python/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'python') 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')) -- cgit v1.3.1