switch from a match to if else

This commit is contained in:
crp3844
2022-09-07 10:32:25 -04:00
parent 503e5bce53
commit d684cd0360

View File

@@ -148,11 +148,11 @@ def encrypt(client, data):
def decrypt(client, data):
array_json = base64.b64decode(data)
array = json.loads(array_json)
match array['version']:
case 1:
decrypt_v1(client, data)
case _:
logger.error("Unable to detemine encryption version.")
if array['version'] == 1:
decrypt_v1(client, data)
else:
logger.error("Unable to detemine encryption version.")
def decrypt_v1(client, data):
try: