mirror of https://github.com/MISP/PyMISP
fix: Do not fail on PyMISP import when mail-parser is not present
parent
7b2e78246a
commit
9046b08a3c
|
@ -28,14 +28,12 @@ class MISPMailObjectOutlookException(InvalidMISPObject):
|
|||
pass
|
||||
|
||||
|
||||
if not mailparser:
|
||||
raise MISPMailObjectOutlookException('mail-parser is required to use this module, you can install it by running pip3 install pymisp[email]')
|
||||
|
||||
|
||||
class EMailObject(AbstractMISPObjectGenerator):
|
||||
def __init__(self, filepath: Union[Path, str] = None, pseudofile: BytesIO = None,
|
||||
attach_original_email: bool = True, **kwargs):
|
||||
super().__init__("email", **kwargs)
|
||||
if not mailparser:
|
||||
raise MISPMailObjectOutlookException('mail-parser is required to use this module, you can install it by running pip3 install pymisp[email]')
|
||||
|
||||
converted = False
|
||||
if filepath:
|
||||
|
|
Loading…
Reference in New Issue