diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 3a25b7781a..499214a0e9 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -162,6 +162,8 @@ class PauseAtHeight(Script): # use offset to calculate the current height: = - layer_0_z = 0 current_z = 0 + current_height = 0 + current_layer = 0 current_extrusion_f = 0 got_first_g_cmd_on_layer_0 = False current_t = 0 #Tracks the current extruder for tracking the target temperature. @@ -263,8 +265,8 @@ class PauseAtHeight(Script): # the nozzle) x, y = self.getNextXY(layer) prev_lines = prev_layer.split("\n") - for line in prev_lines: - new_e = self.getValue(line, 'E', current_e) + for lin in prev_lines: + new_e = self.getValue(lin, "E", current_e) if new_e != current_e: current_e = new_e break diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index e32e4c8745..4930835f58 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -328,7 +328,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def _setFirmwareName(self, name): new_name = re.findall(r"FIRMWARE_NAME:(.*);", str(name)) - if new_name: + if new_name: self._firmware_name = new_name[0] Logger.log("i", "USB output device Firmware name: %s", self._firmware_name) else: