From 74b0056095c7a4d0bfa9409f537a9458514dc3cf Mon Sep 17 00:00:00 2001 From: Nicanor Romero Venier Date: Mon, 7 Sep 2015 10:52:03 +0200 Subject: [PATCH] Added info to the hook's docs --- docs/plugins/hooks.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 303a5e12..add3d78b 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -167,7 +167,9 @@ octoprint.comm.protocol.gcode.received .. py:function:: hook(comm_instance, line, *args, **kwargs) Get the returned lines sent by the printer. Handlers should return the received line or in any case, the modified - version of it. + version of it. If the the handler returns None, processing will be aborted and the communication layer will get an + empty string as the received line. Note that Python functions will also automatically return ``None`` if an empty + ``return`` statement is used or just nothing is returned explicitely from the handler. **Example:**