Skip to content

Commit afbad53

Browse files
committed
Add the missing try-catch
1 parent 5862d60 commit afbad53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cryptolens_python2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ def activate(token, rsa_pub_key, product_id, key, machine_code, fields_to_return
219219

220220
response = Response("","",0,"")
221221

222-
#try:
223-
response = Response.from_string(HelperMethods.send_request("key/activate", {"token":token,\
222+
try:
223+
response = Response.from_string(HelperMethods.send_request("key/activate", {"token":token,\
224224
"ProductId":product_id,\
225225
"key":key,\
226226
"MachineCode":machine_code,\
@@ -230,8 +230,8 @@ def activate(token, rsa_pub_key, product_id, key, machine_code, fields_to_return
230230
"MaxOverdraft": max_overdraft,\
231231
"Sign":"True",\
232232
"SignMethod":1}))
233-
#except Exception:
234-
# return (None, "Could not contact the server.")
233+
except Exception:
234+
return (None, "Could not contact the server.")
235235

236236
pubkey = RSAPublicKey.from_string(rsa_pub_key)
237237

0 commit comments

Comments
 (0)