Skip to content

Commit d275e79

Browse files
committed
Fix an issue with Helpers.IsOnRightMachine for floating (using ModelVersion=3)
1 parent 5ea647b commit d275e79

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

licensing/methods.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,10 @@ def IsOnRightMachine(license_key, is_floating_license = False, allow_overdraft=F
600600
return False
601601

602602
if is_floating_license:
603-
if len(license_key.activated_machines) == 1 and \
604-
(license_key.activated_machines[0].Mid[9:] == current_mid or \
605-
allow_overdraft and license_key.activated_machines[0].Mid[19:] == current_mid):
606-
return True
603+
for act_machine in license_key.activated_machines:
604+
if act_machine.Mid[9:] == current_mid or\
605+
allow_overdraft and act_machine.Mid[19:] == current_mid:
606+
return True
607607
else:
608608
for act_machine in license_key.activated_machines:
609609
if current_mid == act_machine.Mid:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
setup(
33
name = 'licensing', # How you named your package folder (MyLib)
44
packages = ['licensing'], # Chose the same as "name"
5-
version = '0.27', # Start with a small number and increase it with every change you make
5+
version = '0.28', # Start with a small number and increase it with every change you make
66
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
77
description = 'Client library for Cryptolens licensing Web API.', # Give a short description about your library
88
author = 'Cryptolens AB', # Type in your name
99
author_email = '[email protected]', # Type in your E-Mail
1010
url = 'https://cryptolens.io', # Provide either the link to your github or to your website
11-
download_url = 'https://github.com/Cryptolens/cryptolens-python/archive/v_27.tar.gz', # I explain this later on
11+
download_url = 'https://github.com/Cryptolens/cryptolens-python/archive/v_28.tar.gz', # I explain this later on
1212
keywords = ['software licensing', 'licensing library', 'cryptolens'], # Keywords that define your package best
1313
classifiers=[
1414
#'Development Status :: 5 - Stable', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package

0 commit comments

Comments
 (0)