Skip to content

Commit 098e79e

Browse files
committed
Fix machine code method + from_string
1 parent b39cdfe commit 098e79e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

licensing/internal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def start_process_ps_v2():
159159

160160
cmd = ["powershell", *ps_args.split(" ")]
161161

162-
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
162+
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
163163
out, err = proc.communicate(timeout=120)
164164

165165
rawOutput = out.decode('utf-8').strip()

licensing/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ def __init__(self, license_key, signature, result, message):
167167

168168
@staticmethod
169169
def from_string(responseString):
170-
obj = json.loads(responseString)
170+
obj = dict((k.lower(),v) for k,v in json.loads(responseString).items())
171171

172172
licenseKey = ""
173173
signature = ""
174174
result = 0
175175
message = ""
176176

177-
if "licenseKey" in obj:
178-
licenseKey = obj["licenseKey"]
177+
if "licensekey" in obj:
178+
licenseKey = obj["licensekey"]
179179

180180
if "signature" in obj:
181181
signature = obj["signature"]

0 commit comments

Comments
 (0)