diff options
author | Jesse Noller <jnoller@gmail.com> | 2008-08-11 19:00:15 (GMT) |
---|---|---|
committer | Jesse Noller <jnoller@gmail.com> | 2008-08-11 19:00:15 (GMT) |
commit | 5d35373706a21dfb11765f92dfbde961c9ed4e8c (patch) | |
tree | 50c583e7393c8c0aebcb22d64a39fe141b4d3bcb | |
parent | 9fcd4b3d294a8e4c83dc2d0a4cc6da3cf87268d8 (diff) | |
download | cpython-5d35373706a21dfb11765f92dfbde961c9ed4e8c.zip cpython-5d35373706a21dfb11765f92dfbde961c9ed4e8c.tar.gz cpython-5d35373706a21dfb11765f92dfbde961c9ed4e8c.tar.bz2 |
Fix the connection refused error part of issue 3419, use errno module instead of a static list of possible connection refused messages.
-rw-r--r-- | Lib/multiprocessing/connection.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index 9411c39..cbdcf13 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -11,6 +11,7 @@ __all__ = [ 'Client', 'Listener', 'Pipe' ] import os import sys import socket +import errno import time import tempfile import itertools @@ -250,7 +251,7 @@ def SocketClient(address): try: s.connect(address) except socket.error, e: - if e.args[0] != 10061: # 10061 => connection refused + if e.args[0] != errno.ECONNREFUSED: # connection refused debug('failed to connect to address %s', address) raise time.sleep(0.01) |