mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #48869 from Ch3LL/mac_shell_tests
Catch socket.error exception in testprogram
This commit is contained in:
commit
a84f5155a1
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue