From e938b5a3b0a762dd6f452ad41d594d524d66f935 Mon Sep 17 00:00:00 2001 From: Adam Demuri Date: Thu, 30 Sep 2021 21:35:36 -0600 Subject: [PATCH] Add logging for TypeErrors in plugin settings --- AUTHORS.md | 1 + src/octoprint/server/api/settings.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 5df4de2c5..a9fa09d04 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -149,6 +149,7 @@ date of first contribution): * [Ian Wilt](https://github.com/ianwiltdotcom) * [Ben Sycha](https://github.com/Sycha) * [John Boiles](https://github.com/johnboiles) + * [Adam DeMuri](https://github.com/ademuri) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index 7ba715239..57934548d 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py @@ -1122,7 +1122,7 @@ def _saveSettings(data): plugin.on_settings_save(data["plugins"][plugin_id]) except TypeError: logger.warning( - "Could not save settings for plugin {name} ({version}) since it called super(...)".format( + "Could not save settings for plugin {name} ({version}). It may have called super(...)".format( name=plugin._plugin_name, version=plugin._plugin_version ) ) @@ -1133,7 +1133,8 @@ def _saveSettings(data): "Please contact the plugin's author and ask to update the plugin to use a direct call like" ) logger.warning( - "octoprint.plugin.SettingsPlugin.on_settings_save(self, data) instead." + "octoprint.plugin.SettingsPlugin.on_settings_save(self, data) instead.", + exc_info=True, ) except Exception: logger.exception(