Commit 2bdf9fe0 authored by Guillaume Seguin's avatar Guillaume Seguin

Call sys.exit() directly from do_exit() (#253)

parent 7ddd6400
......@@ -1287,10 +1287,10 @@ class pronsole(cmd.Cmd):
print "Are you sure you want to exit while printing?"
print "(this will terminate the print)."
if not self.confirm():
return False
return
self.log(_("Exiting program. Goodbye!"))
self.p.disconnect()
return True
sys.exit()
def help_exit(self):
self.log(_("Disconnects from the printer and exits the program."))
......@@ -1474,9 +1474,7 @@ class pronsole(cmd.Cmd):
line = raw_input(self.prompt)
except EOFError:
print ""
should_exit = self.do_exit("")
if should_exit:
exit()
self.do_exit("")
except KeyboardInterrupt:
print ""
line = ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment