fix: Make mail-parser really optional

pull/665/head
Raphaël Vinot 2020-11-24 12:18:26 +01:00
parent f4daae7219
commit 71fe62b466
1 changed files with 9 additions and 3 deletions

View File

@ -12,16 +12,22 @@ from .asnobject import ASNObject # noqa
from .geolocationobject import GeolocationObject # noqa
from .git_vuln_finder_object import GitVulnFinderObject # noqa
from .emailobject import EMailObject # noqa
try:
from .emailobject import EMailObject # noqa
except ImportError:
# Requires mail-parser, which requires perl packages, optional [email]
pass
from .vehicleobject import VehicleObject # noqa
from .csvloader import CSVLoader # noqa
from .sshauthkeyobject import SSHAuthorizedKeysObject # noqa
from .feed import feed_meta_generator # noqa
from .update_objects import update_objects # noqa
try:
from .urlobject import URLObject # noqa
except ImportError:
# Requires faup, which is a bit difficult to install
# Requires pyfaup, optional dependency [url]
pass
except OSError:
# faup required liblua-5.3
@ -32,5 +38,5 @@ try:
from .elfobject import ELFObject, ELFSectionObject # noqa
from .machoobject import MachOObject, MachOSectionObject # noqa
except ImportError:
# Requires lief, which is a bit difficult to install
# Requires lief, optional [fileobjects]
pass