]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Always reraise KeyboardInterrupt and SystemExit whenever IOLoop tries to
authorBen Darnell <bdarnell@beaker.local>
Wed, 24 Feb 2010 23:18:39 +0000 (15:18 -0800)
committerBen Darnell <bdarnell@beaker.local>
Wed, 24 Feb 2010 23:18:39 +0000 (15:18 -0800)
swallow exceptions.

tornado/ioloop.py

index 44cdffdeaaa70ff9896517b5e4d19e17220c14b9..8a325cb9c426429f435e3b5a231ec82f8162f679 100644 (file)
@@ -195,7 +195,7 @@ class IOLoop(object):
                 fd, events = self._events.popitem()
                 try:
                     self._handlers[fd](fd, events)
-                except KeyboardInterrupt:
+                except (KeyboardInterrupt, SystemExit):
                     raise
                 except (OSError, IOError), e:
                     if e[0] == errno.EPIPE:
@@ -308,6 +308,8 @@ class PeriodicCallback(object):
         if not self._running: return
         try:
             self.callback()
+        except (KeyboardInterrupt, SystemExit):
+            raise
         except:
             logging.error("Error in periodic callback", exc_info=True)
         self.start()