toolhead: Avoid directly accessing the printer.mcu field

Lookup the mcu object from the printer objects and store it locally in
the toolhead class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2017-08-26 18:27:21 -04:00
1 parent 68ba3d5106
commit a42cb4fecf
2 files changed
+15 -12

No files matched your search

+1 -1
View File
@@ -429,7 +429,7 @@ class GCodeParser:
return
try:
res = self.toolhead.query_endstops()
except self.printer.mcu.error as e:
except homing.EndstopError as e:
self.respond_error(str(e))
return
self.respond(" ".join(["%s:%s" % (name, ["open", "TRIGGERED"][not not t])