Author: Brian Kearns <[email protected]>
Branch: issue1430
Changeset: r71153:8e3ca2c46a2f
Date: 2014-05-01 17:05 -0400
http://bitbucket.org/pypy/pypy/changeset/8e3ca2c46a2f/

Log:    we don't expect socketerror from this

diff --git a/pypy/module/_socket/interp_func.py 
b/pypy/module/_socket/interp_func.py
--- a/pypy/module/_socket/interp_func.py
+++ b/pypy/module/_socket/interp_func.py
@@ -42,8 +42,8 @@
     Return the true host name, a list of aliases, and a list of IP addresses,
     for a host.  The host argument is a string giving a host name or IP number.
     """
+    lock = space.fromcache(State).gethostbyxxx_lock
     try:
-        lock = space.fromcache(State).gethostbyxxx_lock
         res = rsocket.gethostbyname_ex(host, lock)
     except SocketError, e:
         raise converted_error(space, e)
@@ -56,8 +56,8 @@
     Return the true host name, a list of aliases, and a list of IP addresses,
     for a host.  The host argument is a string giving a host name or IP number.
     """
+    lock = space.fromcache(State).gethostbyxxx_lock
     try:
-        lock = space.fromcache(State).gethostbyxxx_lock
         res = rsocket.gethostbyaddr(host, lock)
     except SocketError, e:
         raise converted_error(space, e)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to