mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use errno
This commit is contained in:
parent
e7de99dd0e
commit
2c88e22c07
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ import weakref
|
|||
import urlparse # TODO: remove
|
||||
import time
|
||||
import traceback
|
||||
import errno
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.crypt
|
||||
|
@ -435,7 +436,7 @@ class TCPReqServerChannel(salt.transport.mixins.auth.AESReqServerMixin, salt.tra
|
|||
try:
|
||||
self._socket.shutdown(socket.SHUT_RDWR)
|
||||
except socket.error as exc:
|
||||
if exc.errno == 107:
|
||||
if exc.errno == errno.ENOTCONN:
|
||||
# We may try to shutdown a socket which is already disconnected.
|
||||
# Ignore this condition and continue.
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue