From: Guido van Rossum Date: Thu, 31 Oct 2013 18:01:40 +0000 (-0700) Subject: Close resources owned by subclass before calling super().close(). X-Git-Tag: v3.4.0b1~443 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a2ced1c5b91ea05300dfcb0801f1ffaf58647f;p=thirdparty%2FPython%2Fcpython.git Close resources owned by subclass before calling super().close(). --- diff --git a/Lib/selectors.py b/Lib/selectors.py index 3e6c2adcb58a..3638e8544c64 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.