@@ -61,9 +61,9 @@ result = Key.activate(token=auth,\
6161 rsa_pub_key = RSAPubKey,\
6262 product_id = 3349 , \
6363 key = " ICVLD-VVSZR-ZTICT-YKGXL" ,\
64- machine_code = Helpers.GetMachineCode())
64+ machine_code = Helpers.GetMachineCode(v = 2 ))
6565
66- if result[0 ] == None or not Helpers.IsOnRightMachine(result[0 ]):
66+ if result[0 ] == None or not Helpers.IsOnRightMachine(result[0 ], v = 2 ):
6767 # an error occurred or the key is invalid or it cannot be activated
6868 # (eg. the limit of activated devices was achieved)
6969 print (" The license does not work: {0} " .format(result[1 ]))
@@ -102,7 +102,7 @@ When loading it back, we can use the code below:
102102with open (' licensefile.skm' , ' r' ) as f:
103103 license_key = LicenseKey.load_from_string(pubKey, f.read())
104104
105- if license_key == None or not Helpers.IsOnRightMachine(license_key):
105+ if license_key == None or not Helpers.IsOnRightMachine(license_key, v = 2 ):
106106 print (" NOTE: This license file does not belong to this machine." )
107107 else :
108108 print (" Feature 1: " + str (license_key.f1))
@@ -139,11 +139,11 @@ result = Key.activate(token=auth,\
139139 rsa_pub_key = RSAPubKey,\
140140 product_id = 3349 , \
141141 key = " ICVLD-VVSZR-ZTICT-YKGXL" ,\
142- machine_code = Helpers.GetMachineCode(),\
142+ machine_code = Helpers.GetMachineCode(v = 2 ),\
143143 floating_time_interval = 300 ,\
144144 max_overdraft = 1 )
145145
146- if result[0 ] == None or not Helpers.IsOnRightMachine(res[0 ], is_floating_license = True , allow_overdraft = True ):
146+ if result[0 ] == None or not Helpers.IsOnRightMachine(res[0 ], is_floating_license = True , allow_overdraft = True , v = 2 ):
147147 print (" An error occurred: {0} " .format(result[1 ]))
148148else :
149149 print (" Success" )
@@ -184,10 +184,10 @@ result = Key.activate(token=auth,\
184184 rsa_pub_key = RSAPubKey,\
185185 product_id = 3349 , \
186186 key = trial_key[0 ],\
187- machine_code = Helpers.GetMachineCode())
187+ machine_code = Helpers.GetMachineCode(v = 2 ))
188188
189189
190- if result[0 ] == None or not Helpers.IsOnRightMachine(result[0 ]):
190+ if result[0 ] == None or not Helpers.IsOnRightMachine(result[0 ], v = 2 ):
191191 print (" An error occurred: {0} " .format(result[1 ]))
192192else :
193193 print (" Success" )
0 commit comments