From e722c2f8adef5dce085205977a0e83331aba5837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 21 Jun 2015 00:32:59 +0200 Subject: [PATCH] Sanity check: verify that plugin settings data jsonifies without error More resilience which apparently is necessary as witnessed in #946 --- src/octoprint/server/api/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index 187ff460..524b0e03 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py @@ -122,6 +122,11 @@ def getSettings(): def process_plugin_result(name, result): if result: + try: + jsonify(test=result) + except: + logger.exception("Error while jsonifying settings from plugin {}, please contact the plugin author about this".format(name)) + if not "plugins" in data: data["plugins"] = dict() if "__enabled" in result: