diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index 8373d1d7..c22b0126 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -15,12 +15,18 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import raven import os import sys import struct import platform +try: + import raven + RAVEN_AVAILABLE = True +except ImportError: + # raven is not installed with deb package in order to simplify packagin + RAVEN_AVAILABLE = False + from .version import __version__ from .config import Config @@ -47,6 +53,8 @@ class CrashReport: self._client = None def capture_exception(self, request=None): + if not RAVEN_AVAILABLE: + return server_config = Config.instance().get_section_config("Server") if server_config.getboolean("report_errors"): if self._client is None: