fix: Properly catch error if reportlab isn't installed

pull/362/head
Raphaël Vinot 2019-02-27 21:23:59 -08:00
parent 2e93aad34a
commit 3e64a7b03d
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ try:
# Let's not bother with python 2
try:
from .tools import reportlab_generator # noqa
except ImportError:
except NameError:
# FIXME: The import should not raise an exception if reportlab isn't installed
pass
if sys.version_info >= (3, 6):

View File

@ -41,7 +41,7 @@ setup(
],
install_requires=['six', 'requests', 'python-dateutil', 'jsonschema',
'python-dateutil', 'enum34;python_version<"3.4"',
'functools32;python_version<"3.0"', 'reportlab'],
'functools32;python_version<"3.0"'],
extras_require={'fileobjects': ['lief>=0.8', 'python-magic'],
'neo': ['py2neo'],
'openioc': ['beautifulsoup4'],