Permalink
Browse files

Merge branch 'maintenance' into develop

  • Loading branch information...
wagner-certat committed Nov 8, 2018
2 parents d4a7b48 + 7ef2d7c commit af051c2feb1673144fa61148ec329ac8e6ecd88b
Showing with 13 additions and 10 deletions.
  1. +2 −0 CHANGELOG.md
  2. +2 −2 intelmq/bots/experts/sieve/README.md
  3. +9 −8 intelmq/bots/experts/sieve/expert.py
@@ -127,6 +127,8 @@ CHANGELOG
- `intelmq.bots.experts.sieve.expert`:
- check method: Add missing of the harmonization for the check, caused an error for every check.
- Add text and more context to error messages.
- README: Fix 'modify' to 'update' (#1340).
- Handle empty rules file (#1343).
#### Outputs
- `intelmq.bots.outputs.redis`: Fix sending password to redis server.
@@ -116,11 +116,11 @@ in the sieve file will be forwarded to the next bot in the pipeline, unless the
* `add!` same as above, but will force overwrite the key in the event.
* `modify` modifies an existing value for a key. Only applies if the key is
* `update` modifies an existing value for a key. Only applies if the key is
already defined. If the key is not defined in the event, this action is ignored.
Example:
```modify feed.accuracy = 50```
```update feed.accuracy = 50```
* `remove` removes a key/value from the event. Action is ignored if the key is
not defined in the event. Example:
@@ -87,14 +87,15 @@ def check(parameters):
def process(self):
event = self.receive_message()
procedure = Procedure.CONTINUE
for rule in self.sieve.rules:
procedure = self.process_rule(rule, event)
if procedure == Procedure.KEEP:
self.logger.debug('Stop processing based on rule at %s: %s.', self.get_linecol(rule), event)
break
elif procedure == Procedure.DROP:
self.logger.debug('Dropped event based on rule at %s: %s.', self.get_linecol(rule), event)
break
if self.sieve: # empty rules file results in empty string
for rule in self.sieve.rules:
procedure = self.process_rule(rule, event)
if procedure == Procedure.KEEP:
self.logger.debug('Stop processing based on rule at %s: %s.', self.get_linecol(rule), event)
break
elif procedure == Procedure.DROP:
self.logger.debug('Dropped event based on rule at %s: %s.', self.get_linecol(rule), event)
break
# forwarding decision
if procedure != Procedure.DROP:

0 comments on commit af051c2

Please sign in to comment.