Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Quit mainloop when receiving a KeyboardInterrupt exception.

refs #48
  • Loading branch information...
commit 50cfe22239cc16d5b8d9db3a69e5ffb3b1507b8d 1 parent a6419d3
@tmbinc tmbinc authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 e2reactor.py
View
5 e2reactor.py
@@ -36,7 +36,10 @@ def unregister(self, fd):
del self.dict[fd]
def poll(self, timeout = None):
- r = self.eApp.poll(timeout, self.dict)
+ try:
+ r = self.eApp.poll(timeout, self.dict)
+ except KeyboardInterrupt:
+ return None
return r
poller = E2SharedPoll()
Please sign in to comment.
Something went wrong with that request. Please try again.