Merge pull request #48869 from Ch3LL/mac_shell_tests

Catch socket.error exception in testprogram
This commit is contained in:
Nicole Thomas 2018-08-02 10:19:22 -04:00 committed by GitHub
commit a84f5155a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -598,7 +598,7 @@ class TestSaltProgram(six.with_metaclass(TestSaltProgramMeta, TestProgram)):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
connect = sock.bind(('localhost', port))
except OSError:
except (socket.error, OSError):
# these ports are already in use, use different ones
pub_port = 4606
ret_port = 4607