Commit 02a34666 authored by Guillaume Seguin's avatar Guillaume Seguin

Nest print thread into a try block

parent 2cc0df4f
...@@ -405,6 +405,7 @@ class printcore(): ...@@ -405,6 +405,7 @@ class printcore():
def _print(self, resuming = False): def _print(self, resuming = False):
self._stop_sender() self._stop_sender()
try:
if self.startcb: if self.startcb:
#callback for printing started #callback for printing started
try: self.startcb(resuming) try: self.startcb(resuming)
...@@ -418,6 +419,10 @@ class printcore(): ...@@ -418,6 +419,10 @@ class printcore():
#callback for printing done #callback for printing done
try: self.endcb() try: self.endcb()
except: pass except: pass
except:
print "Print thread died due to the following error:"
traceback.print_exc()
finally:
self.print_thread = None self.print_thread = None
self._start_sender() self._start_sender()
......
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