You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2018/01/09 01:37:37 UTC
[kibble-scanners] branch master updated: If not key phrases,
put _NULL_ to avoid breaking ES
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble-scanners.git
The following commit(s) were added to refs/heads/master by this push:
new 0a0bedb If not key phrases, put _NULL_ to avoid breaking ES
0a0bedb is described below
commit 0a0bedb908a487d958105e4f2a8e7758d77fc252
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jan 9 02:37:27 2018 +0100
If not key phrases, put _NULL_ to avoid breaking ES
ES does not seem to like empty sets here, so we'll
put _NULL_ in there when no phrases were found,
and ignore that in the UI.
---
src/plugins/scanners/ponymail-kpe.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/plugins/scanners/ponymail-kpe.py b/src/plugins/scanners/ponymail-kpe.py
index 5137b20..c63fce7 100644
--- a/src/plugins/scanners/ponymail-kpe.py
+++ b/src/plugins/scanners/ponymail-kpe.py
@@ -133,6 +133,8 @@ def scan(KibbleBit, source):
bid = hit[0]
eml = hit[2]
a += 1
+ if not kpe:
+ kpe = ['_NULL_']
eml['kpe'] = kpe
print("Key phrases for %s: %s" % (bid, ", ".join(kpe)))
KibbleBit.index('email', bid, eml)
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].