diff options
author | André Apitzsch <git@apitzsch.eu> | 2017-05-17 00:51:12 +0300 |
---|---|---|
committer | André Apitzsch <git@apitzsch.eu> | 2017-05-17 00:51:12 +0300 |
commit | e9038f2220ba2b0cc0a5055ac59c53b2d5106247 (patch) | |
tree | c8f6ffca1d0cb8fd62219fb9431b4dead08756f8 /src | |
parent | a0a27d9cb259f5e1515e1cf51050dfec68d722dc (diff) |
Zeroconf: SSL_ERROR_* has been moved to ssl module
fixes #8625
Diffstat (limited to 'src')
-rw-r--r-- | src/common/zeroconf/client_zeroconf.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/zeroconf/client_zeroconf.py b/src/common/zeroconf/client_zeroconf.py index f24d041a8..5a1bd541e 100644 --- a/src/common/zeroconf/client_zeroconf.py +++ b/src/common/zeroconf/client_zeroconf.py @@ -27,6 +27,7 @@ from common.zeroconf import zeroconf from nbxmpp.protocol import * import socket +import ssl import errno import sys import os @@ -515,14 +516,14 @@ class P2PConnection(IdleObject, PlugIn): except Exception as e: errnum = e.errno # "received" will be empty anyhow - if errnum == socket.SSL_ERROR_WANT_READ: + if errnum == ssl.SSL_ERROR_WANT_READ: pass elif errnum in [errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN]: self.pollend() # don't proccess result, cas it will raise error return elif not received : - if errnum != socket.SSL_ERROR_EOF: + if errnum != ssl.SSL_ERROR_EOF: # 8 EOF occurred in violation of protocol self.pollend() if self.state >= 0: @@ -583,7 +584,7 @@ class P2PConnection(IdleObject, PlugIn): self._on_send() except socket.error as e: - if e.errno == socket.SSL_ERROR_WANT_WRITE: + if e.errno == ssl.SSL_ERROR_WANT_WRITE: return True if self.state < 0: self.disconnect() |