Add logging for TypeErrors in plugin settings

This commit is contained in:
Adam Demuri committed 2021-09-30 22:15:09 -06:00
1 parent 129dde8ba0
commit e938b5a3b0
2 files changed
+4 -2

No files matched your search

+1
View File
@@ -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
+3 -2
View File
@@ -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(