From: Ben Pfaff Date: Tue, 20 Nov 2012 15:45:56 +0000 (-0800) Subject: python/ovs/socket_util: Fix error path in set_nonblocking. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff_plain;h=a32f0904a7ed4b9cdc05165920d33cfe45349933 python/ovs/socket_util: Fix error path in set_nonblocking. 'e' is an exception, not a socket, so get_exception_errno() is the appropriate function to obtain an error code from it. Signed-off-by: Ben Pfaff Acked-by: Kyle Mestery --- diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index 1fc80fd3..f54b9040 100644 --- a/python/ovs/socket_util.py +++ b/python/ovs/socket_util.py @@ -182,7 +182,7 @@ def set_nonblocking(sock): sock.setblocking(0) except socket.error, e: vlog.err("could not set nonblocking mode on socket: %s" - % os.strerror(get_socket_error(e))) + % os.strerror(get_exception_errno(e))) def set_dscp(sock, dscp):