From 4b7150cc6959a54af1ead4058a162e87a17c07ed Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Sat, 1 Jul 2023 15:13:52 +0200 Subject: [PATCH] chg: [internal] Resolve deprecation warning in qrcode --- misp_modules/modules/expansion/qrcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp_modules/modules/expansion/qrcode.py b/misp_modules/modules/expansion/qrcode.py index 9a62827..bb3effd 100644 --- a/misp_modules/modules/expansion/qrcode.py +++ b/misp_modules/modules/expansion/qrcode.py @@ -27,7 +27,7 @@ def handler(q=False): q = json.loads(q) filename = q['attachment'] try: - img_array = np.fromstring(binascii.a2b_base64(q['data']), np.uint8) + img_array = np.frombuffer(binascii.a2b_base64(q['data']), np.uint8) except Exception as e: err = "Couldn't fetch attachment (JSON 'data' is empty). Are you using the 'Query enrichment' action?" misperrors['error'] = err