From d68c7bfc67661c2bcf75fd0aff3b8f304366bcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 1 Apr 2019 13:57:29 +0200 Subject: [PATCH] =?UTF-8?q?=E2=98=94=20More=20resilience=20against=20platf?= =?UTF-8?q?orm=20startup=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Might solve problems like #3100, but that is only a shot in the dark at this point. --- src/octoprint/environment.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/octoprint/environment.py b/src/octoprint/environment.py index 35865ceb4..6b22a22ac 100644 --- a/src/octoprint/environment.py +++ b/src/octoprint/environment.py @@ -25,10 +25,15 @@ class EnvironmentDetector(object): self._cache = None self._cache_lock = threading.RLock() - self._environment_plugins = self._plugin_manager.get_implementations(EnvironmentDetectionPlugin) - self._logger = logging.getLogger(__name__) + try: + self._environment_plugins = self._plugin_manager.get_implementations(EnvironmentDetectionPlugin) + except Exception: + # just in case, see #3100... + self._logger.exception("There was an error fetching EnvironmentDetectionPlugins from the plugin manager") + self._environment_plugins = [] + @property def environment(self): with self._cache_lock: