[FIX] netsvc.py: ignore ENOTCONN on windows when calling shutdown() on sockets

bzr revid: chs@openerp.com-20121205141106-0oynmc3qdvy58owu
This commit is contained in:
Christophe Simonis 2012-12-05 15:11:06 +01:00
parent c11bbc76e6
commit f9d8d746e2
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def close_socket(sock):
# of the other side (or something), see
# http://bugs.python.org/issue4397
# note: stdlib fixed test, not behavior
if e.errno != errno.ENOTCONN or platform.system() != 'Darwin':
if e.errno != errno.ENOTCONN or platform.system() not in ['Darwin', 'Windows']:
raise
sock.close()