From b778dd5e67933ce5127e3d4d02cf45be51dc7489 Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Thu, 15 Nov 2018 19:47:02 +0100 Subject: [PATCH] fix: Fixed type of the result in case of exception - Set as str since some exception types are not jsonable --- misp_modules/modules/expansion/dbl_spamhaus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp_modules/modules/expansion/dbl_spamhaus.py b/misp_modules/modules/expansion/dbl_spamhaus.py index 306ea21..f372961 100644 --- a/misp_modules/modules/expansion/dbl_spamhaus.py +++ b/misp_modules/modules/expansion/dbl_spamhaus.py @@ -49,7 +49,7 @@ def handler(q=False): query_result = resolver.query(query, 'A')[0] result = "{} - {}".format(requested_value, dbl_mapping[str(query_result)]) except Exception as e: - result = e + result = str(e) return {'results': [{'types': mispattributes.get('output'), 'values': result}]} def introspection():