Skip to content

Commit

Permalink
DEP: rt collector: removed parameter unzip_attachment
Browse files Browse the repository at this point in the history
compatibility with the deprecated parameter `unzip_attachment` (removed in 2.1.0) was removed.
#1404
  • Loading branch information
Sebastian Wagner committed Jun 17, 2021
1 parent 7fc8bd4 commit 44b6b6b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Update allowed classification fields to 2020-01-28 version (#1409, #1476).
- `intelmq.bots.collectors.api.collector_api` (PR#1987 by Mikk Margus Möll, fixes #1986):
- Added UNIX socket capability.
- Correctly close the IOLoop in the shutdown method to fix reload.
- `intelmq.bots.collectors.rt.collector_rt` (PR#1997 by Sebastian Wagner, #1404):
- compatibility with the deprecated parameter `unzip_attachment` (removed in 2.1.0) was removed.

#### Parsers
- Added `intelmq.bots.parsers.fireeye`: A bot that parses hashes and URLs from Fireeye MAS indicators (PR#1745 by Christopher Schappelwein).
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The `runtime.conf` file was replaced by a `runtime.yaml` file. IntelMQ moves the
#### Removal of deprecated bots and behaviour
- The bot `intelmq.bots.experts.ripencc_abuse_contact.expert` has been removed. It was replaced by `intelmq.bots.experts.ripe.expert` and marked as deprecated in 2.0.0.beta1.
- Modify expert: Compatibility with the deprecated configuration format (before 1.0.0.dev7) was removed.
- RT collector: compatibility with the deprecated parameter `unzip_attachment` (removed in 2.1.0) was removed.


### Libraries
Expand Down
12 changes: 0 additions & 12 deletions intelmq/bots/collectors/rt/collector_rt.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,6 @@ def init(self):
self._parse_extract_file_parameter('extract_attachment')
self._parse_extract_file_parameter('extract_download')

if hasattr(self, 'unzip_attachment'):
self.logger.warning("The parameter 'unzip_attachment' is deprecated and "
"will be removed in version 3.0 in favor of the "
"more generic and powerful 'extract_attachment'. "
"Look at the Bots documentation for more details.")
if not self.extract_attachment:
self.extract_attachment = self.unzip_attachment
else:
self.logger.warn("Both 'extract_attachment' and the deprecated "
"'unzip_attachment' parameter are in use. Ignoring "
"the latter one.")

def process(self):
RT = rt.Rt(self.uri, self.user,
self.password)
Expand Down
4 changes: 0 additions & 4 deletions intelmq/tests/bots/collectors/rt/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def set_bot(cls):
'search_status': 'new',
'attachment_regex': '.*.zip',
'url_regex': None,
'unzip_attachment': True,
'name': 'Example feed',
'extract_attachment': True,
}
Expand All @@ -73,7 +72,6 @@ def test_attachment_zip(self):
"""
Test a zipped attachment
"""
self.allowed_warning_count = 2
self.run_bot(iterations=1)
self.assertMessageEqual(0, REPORT)

Expand All @@ -83,7 +81,6 @@ def test_attachment_gz(self):
"""
Test a gzipped attachment
"""
self.allowed_warning_count = 2
self.prepare_bot(parameters={'attachment_regex': r'.*\.gz'})
self.run_bot(iterations=1, prepare=False)
self.assertMessageEqual(0, REPORT)
Expand All @@ -94,7 +91,6 @@ def test_url_zip(self):
"""
Test a zipped URL
"""
self.allowed_warning_count = 2
self.prepare_bot(parameters={'attachment_regex': None,
'url_regex': r'http://localhost/.*\.zip',
'extract_download': True})
Expand Down

0 comments on commit 44b6b6b

Please sign in to comment.