From 2f5e9553670b2054fe26a6fb168c267c5a05eb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 30 Jan 2015 21:47:48 +0100 Subject: [PATCH] Fixed an issue causing slicing not to work due to a change in how the used sarge library works Starting commands asynchronously now necessitates a call to Pipeline.wait_events in order to be able to access the started Command instances. Not waiting causes the list of commands to be not fully populated and hence issues with code depending on that stuff being present. --- src/octoprint/plugins/cura/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/octoprint/plugins/cura/__init__.py b/src/octoprint/plugins/cura/__init__.py index a756d885..b0509df4 100644 --- a/src/octoprint/plugins/cura/__init__.py +++ b/src/octoprint/plugins/cura/__init__.py @@ -241,6 +241,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin, self._logger.info("Running %r in %s" % (command, working_dir)) p = sarge.run(command, cwd=working_dir, async=True, stdout=sarge.Capture(), stderr=sarge.Capture()) + p.wait_events() self._slicing_commands[machinecode_path] = p.commands[0] try: