##// END OF EJS Templates
avoid AttributeErrors on zmq.ZMQError at shutdown of qtconsole...
MinRK -
Show More
@@ -27,6 +27,9 b' import time'
27
27
28 # System library imports.
28 # System library imports.
29 import zmq
29 import zmq
30 # import ZMQError in top-level namespace, to avoid ugly attribute-error messages
31 # during garbage collection of threads at exit:
32 from zmq import ZMQError
30 from zmq.eventloop import ioloop, zmqstream
33 from zmq.eventloop import ioloop, zmqstream
31
34
32 # Local imports.
35 # Local imports.
@@ -116,7 +119,7 b' class ZMQSocketChannel(Thread):'
116 while True:
119 while True:
117 try:
120 try:
118 self.ioloop.start()
121 self.ioloop.start()
119 except zmq.ZMQError as e:
122 except ZMQError as e:
120 if e.errno == errno.EINTR:
123 if e.errno == errno.EINTR:
121 continue
124 continue
122 else:
125 else:
@@ -505,7 +508,7 b' class HBSocketChannel(ZMQSocketChannel):'
505 while True:
508 while True:
506 try:
509 try:
507 events = self.poller.poll(1000 * until_dead)
510 events = self.poller.poll(1000 * until_dead)
508 except zmq.ZMQError as e:
511 except ZMQError as e:
509 if e.errno == errno.EINTR:
512 if e.errno == errno.EINTR:
510 # ignore interrupts during heartbeat
513 # ignore interrupts during heartbeat
511 # this may never actually happen
514 # this may never actually happen
General Comments 0
You need to be logged in to leave comments. Login now