From 3e64a7b03d39e64ee9502430dd85e2057d08f9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 27 Feb 2019 21:23:59 -0800 Subject: [PATCH] fix: Properly catch error if reportlab isn't installed --- pymisp/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/__init__.py b/pymisp/__init__.py index a015380..2f8144d 100644 --- a/pymisp/__init__.py +++ b/pymisp/__init__.py @@ -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): diff --git a/setup.py b/setup.py index e6d47b3..27ea70f 100644 --- a/setup.py +++ b/setup.py @@ -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'],