Hi there, I'm working on something where I could have a shared network directory for licenses for different machines; at the time of checking activation, I would basically search over all possible folders for a valid license, my code snippet is similar to below.
``` ta = TurboActivate(guid, TA_USER) hardware_address = uuid.getnode() license_root_folder = f"/root/licenses/{hardware_address}" if os.path.exists(license_root_folder): subfolders = os.listdir(license_root_folder) for s in subfolders: license_folder = os.path.join(license_root_folder, s) print('1') ta.set_custom_act_data_path(license_folder) print('2')
if is_license_genuine_and_activated(ta): if is_license_expired(ta): print(f"License from {license_folder} was expired.") continue execution(ta, args.port) else: print(f"No valid license from {license_folder}.")```What I did was basically I would search over a folder's subdirectories for valid license, with the call to `set_custom_act_data_path` for every subdirectory.
However, when I ran this, I got `TurboActivateInvalidHandleError` the first time it ran into `set_custom_act_data_path`, am I calling this right? What's the correct way to achieve my goal?