diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -32,14 +32,22 @@ def write_facts(ruleset: set): os.mkdir(typedir) fs = [] - for f in facts: - if f["type"] != t: + for fact in facts: + if fact["type"] != t: continue + + if fact["type"] == "meta": + continue + + if fact.get("key") is None: + raise Exception(f"Bad fact: no 'key' {fact}") + try: - del f["sid"] + del fact["sid"] except KeyError: pass - fs.append(f) + + fs.append(fact) i = 0 for fact in sorted(fs, key=lambda f: f["key"]): |