Skip to content

Commit 42b52a7

Browse files
committed
Update methods.py
1 parent 4bc1a5e commit 42b52a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

licensing/methods.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,8 @@ def __read_registry_value(key, subkey, value_name):
13931393
except FileNotFoundError:
13941394
return None
13951395
except Exception as e:
1396-
return None //str(e)
1396+
return None #str(e)
1397+
13971398

13981399
@staticmethod
13991400
def GetMachineCode(v=1):
@@ -1416,12 +1417,12 @@ def GetMachineCode(v=1):
14161417
seed = HelperMethods.start_process_ps_v2()
14171418
else:
14181419
seed = HelperMethods.start_process(["cmd.exe", "/C", "wmic","csproduct", "get", "uuid"],v)
1419-
1420-
if seed == "":
1420+
1421+
if seed == "" or seed == None:
14211422
machineGUID = Helpers.__read_registry_value(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Cryptography", "MachineGuid")
14221423

14231424
if machineGUID != None and machineGUID != "":
1424-
return machineGUID //HelperMethods.get_SHA256(machineGUID)
1425+
HelperMethods.get_SHA256(machineGUID)
14251426
return None
14261427
else:
14271428
return HelperMethods.get_SHA256(seed)

0 commit comments

Comments
 (0)