Skip to content

Commit 98df0cd

Browse files
authored
Merge pull request #2532 from rvyhnal/develop
use PyMISP, ExpandedPyMISP is deprecated
2 parents 04c75a3 + 4b20fdb commit 98df0cd

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#### Collectors
2323
- `intelmq.bots.collectors.shadowserver.collector_reports_api.py`:
2424
- Fixed behaviour if parameter `types` value is empty string, behave the same way as not set, not like no type.
25+
- `intelmq.bots.collectors.misp`: Use `PyMISP` class instead of deprecated `ExpandedPyMISP` (PR#2532 by Radek Vyhnal)
2526

2627
#### Parsers
2728
- `intelmq.bots.parsers.shadowserver._config`:
@@ -32,6 +33,7 @@
3233
#### Experts
3334
- `intelmq.bots.experts.securitytxt`:
3435
- Added new bot (PR#2538 by Frank Westers and Sebastian Wagner)
36+
- `intelmq.bots.experts.misp`: Use `PyMISP` class instead of deprecated `ExpandedPyMISP` (PR#2532 by Radek Vyhnal)
3537

3638
#### Outputs
3739
- `intelmq.bots.outputs.cif3.output`:

intelmq/bots/collectors/misp/collector.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
from intelmq.lib.exceptions import MissingDependencyError
2626

2727
try:
28-
try:
29-
from pymisp import ExpandedPyMISP as PyMISP
30-
except ImportError:
31-
from pymisp import PyMISP
28+
from pymisp import PyMISP
3229
except ImportError:
3330
PyMISP = None
3431
import_fail_reason = 'import'

intelmq/bots/experts/misp/expert.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
from intelmq.lib.exceptions import MissingDependencyError
1818

1919
try:
20-
from pymisp import ExpandedPyMISP
20+
from pymisp import PyMISP
2121
except ImportError:
22-
ExpandedPyMISP = None
22+
PyMISP = None
2323

2424

2525
class MISPExpertBot(ExpertBot):
@@ -28,13 +28,13 @@ class MISPExpertBot(ExpertBot):
2828
misp_url: str = "<insert url of MISP server (with trailing '/')>"
2929

3030
def init(self):
31-
if ExpandedPyMISP is None:
31+
if PyMISP is None:
3232
raise MissingDependencyError('pymisp', '>=2.4.117.3')
3333

3434
# Initialize MISP connection
35-
self.misp = ExpandedPyMISP(self.misp_url,
36-
self.misp_key,
37-
self.http_verify_cert)
35+
self.misp = PyMISP(self.misp_url,
36+
self.misp_key,
37+
self.http_verify_cert)
3838

3939
def process(self):
4040
event = self.receive_message()

0 commit comments

Comments
 (0)