Skip to content

Commit

Permalink
fixup! fix: Catch KeyError's when processing events, fix transforms i…
Browse files Browse the repository at this point in the history
…n file-to-file
  • Loading branch information
bmtcril committed Jun 6, 2023
1 parent 2e33ac3 commit 8388f49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def store(self):

out = BytesIO()
for event in self.event_queue:
transformed_event = self.router.processors[0].process(event)
transformed_event = self.router.processors[0](event)
out.write(str.encode(json.dumps(transformed_event)))
out.write(str.encode("\n"))
out.seek(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_transform_command(command_opts, mock_common_calls, caplog, capsys):
# Fake a router mapping so some events in the log are actually processed
mm2.registry.mapping = {"problem_check": 1}
# Fake a process response that can be serialized to json
mm2.process.return_value = {"foo": "bar"}
mm2.return_value = {"foo": "bar"}
mock_eventsrouter.return_value.processors = [mm2]

call_command(
Expand Down

0 comments on commit 8388f49

Please sign in to comment.