]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Close resources owned by subclass before calling super().close().
authorGuido van Rossum <guido@dropbox.com>
Thu, 31 Oct 2013 18:01:40 +0000 (11:01 -0700)
committerGuido van Rossum <guido@dropbox.com>
Thu, 31 Oct 2013 18:01:40 +0000 (11:01 -0700)
Lib/selectors.py

index 3e6c2adcb58a29fc69c5f0b1cba13bda6a50d849..3638e8544c64987bc574c21d54af89213b7558a3 100644 (file)
@@ -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.