Skip to content

Commit

Permalink
1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-zehentleitner committed Oct 6, 2023
1 parent d2a9eb1 commit 0492266
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lucit_licensing_python/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def __init__(self, api_secret: str = None, license_token: str = None,
f"{str(platform.system())} {str(platform.release())} started ...")
if start is True:
self.start()
while self.last_verified_licensing_result is None and self.sigterm is False:
# Block the main process till a valid license is available
time.sleep(0.1)
if self.sigterm is False:
logger.debug(f"LUCIT License Manager is ready!")

def __generate_signature(self, api_secret: str = None, data: dict = None) -> str:
if api_secret is None or data is None:
Expand Down Expand Up @@ -185,7 +190,9 @@ def close(self, close_api_session: bool = True, not_approved_message: str = None
logger.debug(f"Stopping LUCIT Licensing Manager ...")
self.sigterm = True
if self.parent_shutdown_function is not None:
logger.debug(f"Triggering shutdown of parent class ...")
self.parent_shutdown_function(close_api_session=False)
self.parent_shutdown_function = None
if close_api_session is True:
response = self.__private_request(api_secret=None, license_token=None,
key_value=key_value, endpoint="close")
Expand Down

0 comments on commit 0492266

Please sign in to comment.