From 61a2ced1c5b91ea05300dfcb0801f1ffaf58647f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 31 Oct 2013 11:01:40 -0700 Subject: Close resources owned by subclass before calling super().close(). --- Lib/selectors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/selectors.py b/Lib/selectors.py index 3e6c2ad..3638e85 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -351,8 +351,8 @@ if hasattr(select, 'epoll'): return ready def close(self): - super().close() self._epoll.close() + super().close() if hasattr(select, 'kqueue'): @@ -414,8 +414,8 @@ if hasattr(select, 'kqueue'): return ready def close(self): - super().close() self._kqueue.close() + super().close() # Choose the best implementation: roughly, epoll|kqueue > poll > select. -- cgit v0.12