Skip to content

Commit

Permalink
Fix machine code method + from_string
Browse files Browse the repository at this point in the history
  • Loading branch information
artemlos committed Jan 24, 2023
1 parent b39cdfe commit 098e79e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion licensing/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def start_process_ps_v2():

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

proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
out, err = proc.communicate(timeout=120)

rawOutput = out.decode('utf-8').strip()
Expand Down
6 changes: 3 additions & 3 deletions licensing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ def __init__(self, license_key, signature, result, message):

@staticmethod
def from_string(responseString):
obj = json.loads(responseString)
obj = dict((k.lower(),v) for k,v in json.loads(responseString).items())

licenseKey = ""
signature = ""
result = 0
message = ""

if "licenseKey" in obj:
licenseKey = obj["licenseKey"]
if "licensekey" in obj:
licenseKey = obj["licensekey"]

if "signature" in obj:
signature = obj["signature"]
Expand Down

0 comments on commit 098e79e

Please sign in to comment.