Skip to content

Commit

Permalink
Ref #546 - Small clarification in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Sep 7, 2021
1 parent 6c11e40 commit 8bb93a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion irrd/mirroring/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _split_stream(self, data: str) -> None:
self._handle_operation(paragraph, paragraphs)

if self.nrtm_source and last_comment_seen.upper().strip() != f'%END {self.source}':
msg = f'NRTM stream error for {self.source}: last paragraph expected to be ' \
msg = f'NRTM stream error for {self.source}: last comment paragraph expected to be ' \
f'"%END {self.source}", but is actually {last_comment_seen.upper().strip()}'
logger.error(msg)
self.database_handler.record_mirror_error(self.source, msg)
Expand Down
2 changes: 1 addition & 1 deletion irrd/mirroring/tests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def test_test_parse_nrtm_no_end(self):
with pytest.raises(ValueError) as ve:
NRTMStreamParser('TEST', SAMPLE_NRTM_V3_NO_END, mock_dh)

error_msg = 'last paragraph expected to be'
error_msg = 'last comment paragraph expected to be'
assert error_msg in str(ve.value)
assert len(mock_dh.mock_calls) == 1
assert mock_dh.mock_calls[0][0] == 'record_mirror_error'
Expand Down

0 comments on commit 8bb93a2

Please sign in to comment.