##// END OF EJS Templates
properly handle nothing to recv in pykernel._abort_queue...
MinRK -
Show More
@@ -174,13 +174,11 b' class Kernel(HasTraits):'
174
174
175 def _abort_queue(self):
175 def _abort_queue(self):
176 while True:
176 while True:
177 try:
177 ident,msg = self.session.recv(self.reply_socket, zmq.NOBLOCK)
178 ident,msg = self.session.recv(self.reply_socket, zmq.NOBLOCK)
178 if msg is None:
179 except zmq.ZMQError, e:
179 break
180 if e.errno == zmq.EAGAIN:
181 break
182 else:
180 else:
183 assert ident is not None, "Missing message part."
181 assert ident is not None, "Unexpected missing message part."
184 print>>sys.__stdout__, "Aborting:"
182 print>>sys.__stdout__, "Aborting:"
185 print>>sys.__stdout__, Message(msg)
183 print>>sys.__stdout__, Message(msg)
186 msg_type = msg['msg_type']
184 msg_type = msg['msg_type']
General Comments 0
You need to be logged in to leave comments. Login now