klippy: Remove unneeded loop in run() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
32b763efb1
commit
d1da6100a6
|
@ -260,24 +260,23 @@ class Printer:
|
||||||
monotime = self.reactor.monotonic()
|
monotime = self.reactor.monotonic()
|
||||||
logging.info("Start printer at %s (%.1f %.1f)",
|
logging.info("Start printer at %s (%.1f %.1f)",
|
||||||
time.asctime(time.localtime(systime)), systime, monotime)
|
time.asctime(time.localtime(systime)), systime, monotime)
|
||||||
while 1:
|
# Enter main reactor loop
|
||||||
# Enter main reactor loop
|
try:
|
||||||
try:
|
self.reactor.run()
|
||||||
self.reactor.run()
|
except:
|
||||||
except:
|
logging.exception("Unhandled exception during run")
|
||||||
logging.exception("Unhandled exception during run")
|
return "error_exit"
|
||||||
return "error_exit"
|
# Check restart flags
|
||||||
# Check restart flags
|
run_result = self.run_result
|
||||||
run_result = self.run_result
|
try:
|
||||||
try:
|
if run_result == 'firmware_restart':
|
||||||
if run_result == 'firmware_restart':
|
for n, m in self.lookup_objects(module='mcu'):
|
||||||
for n, m in self.lookup_objects(module='mcu'):
|
m.microcontroller_restart()
|
||||||
m.microcontroller_restart()
|
for cb in self.state_cb:
|
||||||
for cb in self.state_cb:
|
cb('disconnect')
|
||||||
cb('disconnect')
|
except:
|
||||||
except:
|
logging.exception("Unhandled exception during post run")
|
||||||
logging.exception("Unhandled exception during post run")
|
return run_result
|
||||||
return run_result
|
|
||||||
def invoke_shutdown(self, msg):
|
def invoke_shutdown(self, msg):
|
||||||
if self.is_shutdown:
|
if self.is_shutdown:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue