]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Catch IOError in addition to OSError in IOLoop.remove_handler
authorBen Darnell <bdarnell@beaker.local>
Sat, 16 Jan 2010 02:42:00 +0000 (18:42 -0800)
committerBen Darnell <bdarnell@beaker.local>
Sat, 16 Jan 2010 02:42:00 +0000 (18:42 -0800)
(friendfeed's epoll module throws OSError, while the one in the standard
library throws IOError)

tornado/ioloop.py

index 5c7f194f2d55977957fbca934195c45268728b91..0b00c334744466a5b4d51628785945f4399fcbb3 100644 (file)
@@ -102,7 +102,7 @@ class IOLoop(object):
         """Returns a global IOLoop instance.
 
         Most single-threaded applications have a single, global IOLoop.
-        Use this method instead of passing around IOLoop instances 
+        Use this method instead of passing around IOLoop instances
         throughout your code.
 
         A common pattern for classes that depend on IOLoops is to use
@@ -136,7 +136,7 @@ class IOLoop(object):
         self._events.pop(fd, None)
         try:
             self._impl.unregister(fd)
-        except OSError:
+        except (OSError, IOError):
             logging.debug("Error deleting fd from IOLoop", exc_info=True)
 
     def start(self):