summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/enterprise.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/enterprise.py b/python/enterprise.py
index 23e7df71..81574241 100644
--- a/python/enterprise.py
+++ b/python/enterprise.py
@@ -4,6 +4,7 @@
import ctypes
import os
+from time import gmtime
from typing import Tuple, List, Optional
import binaryninja._binaryninjacore as core
@@ -342,7 +343,8 @@ class LicenseCheckout:
)
# Keychain auth can activate a license if we have one in the keychain
- if not is_license_still_activated():
+ # If we have an expired named license, try to get a fresh floating one
+ if not is_license_still_activated() or (not is_floating_license() and binaryninja.core_expires() < gmtime()):
acquire_license(self.desired_duration)
self.acquired_license = True