[pypy-commit] pypy default: small cleanups

bdkearns noreply at buildbot.pypy.org
Mon Sep 17 14:01:51 CEST 2012


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r57368:6c22e7d3625f
Date: 2012-09-17 06:25 -0400
http://bitbucket.org/pypy/pypy/changeset/6c22e7d3625f/

Log:	small cleanups

diff --git a/pypy/rlib/rsocket.py b/pypy/rlib/rsocket.py
--- a/pypy/rlib/rsocket.py
+++ b/pypy/rlib/rsocket.py
@@ -812,7 +812,7 @@
                 timeout = self._select(True)
                 if timeout == 0:
                     res = self.getsockopt_int(_c.SOL_SOCKET, _c.SO_ERROR)
-                    if (res == _c.EISCONN):
+                    if res == _c.EISCONN:
                         res = 0
                     errno = res
                 elif timeout == -1:
diff --git a/pypy/rlib/test/test_rsocket.py b/pypy/rlib/test/test_rsocket.py
--- a/pypy/rlib/test/test_rsocket.py
+++ b/pypy/rlib/test/test_rsocket.py
@@ -332,6 +332,7 @@
     s.settimeout(0.1)
     with py.test.raises(SocketTimeout):
         s.connect(INETAddress('240.240.240.240', 12345))
+    s.close()
 
 def test_connect_with_timeout_succeed():
     s = RSocket()


More information about the pypy-commit mailing list