mirror of https://github.com/MISP/misp-modules
fix: Considering the case of empty results
parent
8bcb630340
commit
b560347d5d
|
@ -100,6 +100,8 @@ def handler(q=False):
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
result = "\n".join(["{}: {}".format(l, " - ".join(i)) for l, i in zip(listed, info)])
|
result = "\n".join(["{}: {}".format(l, " - ".join(i)) for l, i in zip(listed, info)])
|
||||||
|
if not result:
|
||||||
|
return {'error': 'No data found by querying known RBLs'}
|
||||||
return {'results': [{'types': mispattributes.get('output'), 'values': result}]}
|
return {'results': [{'types': mispattributes.get('output'), 'values': result}]}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue