Show More
@@ -165,8 +165,14 b' class Kernel(Configurable):' | |||||
165 | # reason for this to be anything less than ~ 0.1s |
|
165 | # reason for this to be anything less than ~ 0.1s | |
166 | # since it is a real poller and will respond |
|
166 | # since it is a real poller and will respond | |
167 | # to events immediately |
|
167 | # to events immediately | |
168 | poller.poll(10*1000*self._poll_interval) |
|
168 | ||
169 | self.do_one_iteration() |
|
169 | # double nested try/except, to properly catch KeyboardInterrupt | |
|
170 | # due to pyzmq Issue #130 | |||
|
171 | try: | |||
|
172 | poller.poll(10*1000*self._poll_interval) | |||
|
173 | self.do_one_iteration() | |||
|
174 | except: | |||
|
175 | raise | |||
170 | except KeyboardInterrupt: |
|
176 | except KeyboardInterrupt: | |
171 | # Ctrl-C shouldn't crash the kernel |
|
177 | # Ctrl-C shouldn't crash the kernel | |
172 | io.raw_print("KeyboardInterrupt caught in kernel") |
|
178 | io.raw_print("KeyboardInterrupt caught in kernel") |
General Comments 0
You need to be logged in to leave comments.
Login now