Author: Amaury Forgeot d'Arc <[email protected]>
Branch:
Changeset: r51702:36fefb3d271e
Date: 2012-01-23 23:05 +0100
http://bitbucket.org/pypy/pypy/changeset/36fefb3d271e/
Log: a, b = space.unpackiterable(w_obj, 2) is not supposed to raise
ValueError
diff --git a/pypy/module/_socket/interp_socket.py
b/pypy/module/_socket/interp_socket.py
--- a/pypy/module/_socket/interp_socket.py
+++ b/pypy/module/_socket/interp_socket.py
@@ -67,9 +67,6 @@
self.connect(self.addr_from_object(space, w_addr))
except SocketError, e:
raise converted_error(space, e)
- except TypeError, e:
- raise OperationError(space.w_TypeError,
- space.wrap(str(e)))
def connect_ex_w(self, space, w_addr):
"""connect_ex(address) -> errno
diff --git a/pypy/rlib/rsocket.py b/pypy/rlib/rsocket.py
--- a/pypy/rlib/rsocket.py
+++ b/pypy/rlib/rsocket.py
@@ -310,10 +310,7 @@
def from_object(space, w_address):
# Parse an app-level object representing an AF_INET address
- try:
- w_host, w_port = space.unpackiterable(w_address, 2)
- except ValueError:
- raise TypeError("AF_INET address must be a tuple of length 2")
+ w_host, w_port = space.unpackiterable(w_address, 2)
host = space.str_w(w_host)
port = space.int_w(w_port)
port = Address.make_ushort_port(space, port)
@@ -544,10 +541,7 @@
space.wrap(self.get_groups())])
def from_object(space, w_address):
- try:
- w_pid, w_groups = space.unpackiterable(w_address, 2)
- except ValueError:
- raise TypeError("AF_NETLINK address must be a tuple of length
2")
+ w_pid, w_groups = space.unpackiterable(w_address, 2)
return NETLINKAddress(space.uint_w(w_pid), space.uint_w(w_groups))
from_object = staticmethod(from_object)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit