✨ Fire action hooks on ALL actions, not just unhandled ones (#4591)
* Fire action hooks on ALL actions, not just unhandled ones * Add my name to the list Co-authored-by: Gina Häußge <gina@octoprint.org>
This commit is contained in:
1 parent
8c871d06c1
commit
b100f65f5b
2 files changed
+20
-19
No files matched your search
@@ -169,6 +169,7 @@ date of first contribution):
|
||||
* [Christian Bianchini](https://github.com/max246)
|
||||
* [Kestin Goforth](https://github.com/kforth)
|
||||
* [Dawid Pieper](https://github.com/dawidpieper)
|
||||
* ["arrdem"](https://github.com/arrdem)
|
||||
|
||||
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
|
||||
|
||||
+19
-19
@@ -2404,25 +2404,25 @@ class MachineCom:
|
||||
level=logging.INFO,
|
||||
)
|
||||
self.refreshSdFiles()
|
||||
else:
|
||||
for name, hook in self._printer_action_hooks.items():
|
||||
try:
|
||||
hook(
|
||||
self,
|
||||
line,
|
||||
action_command,
|
||||
name=action_name,
|
||||
params=action_params,
|
||||
)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
"Error while calling hook from plugin "
|
||||
"{} with action command {}".format(
|
||||
name, action_command
|
||||
),
|
||||
extra={"plugin": name},
|
||||
)
|
||||
continue
|
||||
|
||||
for name, hook in self._printer_action_hooks.items():
|
||||
try:
|
||||
hook(
|
||||
self,
|
||||
line,
|
||||
action_command,
|
||||
name=action_name,
|
||||
params=action_params,
|
||||
)
|
||||
except Exception:
|
||||
self._logger.exception(
|
||||
"Error while calling hook from plugin "
|
||||
"{} with action command {}".format(
|
||||
name, action_command
|
||||
),
|
||||
extra={"plugin": name},
|
||||
)
|
||||
continue
|
||||
|
||||
if self._state not in (
|
||||
self.STATE_CONNECTING,
|
||||
|
||||
Reference in new issue
Block a user