From 2a094042356b3964f7eba1677fdc2b3a0459bc80 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Jan 2020 15:53:55 +0100 Subject: [PATCH] Change ModuleNotFoundError to ImportError THat's what you get from developing with Python 3.6 instead of 3.5 --- plugins/SentryLogger/SentryLogger.py | 2 +- plugins/SentryLogger/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/SentryLogger/SentryLogger.py b/plugins/SentryLogger/SentryLogger.py index c1555133fd..31ab38b6e2 100644 --- a/plugins/SentryLogger/SentryLogger.py +++ b/plugins/SentryLogger/SentryLogger.py @@ -5,7 +5,7 @@ from UM.Logger import LogOutput from typing import Set try: from sentry_sdk import add_breadcrumb -except ModuleNotFoundError: +except ImportError: pass from typing import Optional import os diff --git a/plugins/SentryLogger/__init__.py b/plugins/SentryLogger/__init__.py index 16288bb1b3..1b6b4bf7f8 100644 --- a/plugins/SentryLogger/__init__.py +++ b/plugins/SentryLogger/__init__.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Dict, Any try: import sentry_sdk has_sentry = True -except ModuleNotFoundError: +except ImportError: has_sentry = False from . import SentryLogger