Change in vdsm[master]: packaging: debian: making code compatible with upstream M2Cr...
stirabos at redhat.com
stirabos at redhat.com
Thu Feb 12 14:05:33 UTC 2015
Simone Tiraboschi has posted comments on this change.
Change subject: packaging: debian: making code compatible with upstream M2Crypto
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/37746/1/lib/vdsm/sslutils.py
File lib/vdsm/sslutils.py:
Line 124: client.socket.settimeout
Line 125: )
Line 126: settimeout(self.accept_timeout)
Line 127: client.accept_ssl()
Line 128: settimeout(None)
> can't we just use client.socket.settimeout() in all cases?
Initially I thought the same but than I discovered that "our" M2Crypto is behaving a little differently.
For instance we have:
def settimeout(self, timeout):
"""Set this connection's underlying socket's timeout to _timeout_."""
self.socket.settimeout(timeout)
self._timeout = timeout
if self._timeout is None:
self._timeout = -1.0
and than
def read(self, size=1024):
if self._timeout != 0.0:
return self._read_bio(size)
return self._read_nbio(size)
recv = read
while upstream is just:
def read(self, size=1024):
if self.blocking:
return self._read_bio(size)
return self._read_nbio(size)
recv = read
Line 129: except SSL.SSLError as e:
Line 130: raise SSL.SSLError("%s, client %s" % (e, address[0]))
Line 131:
Line 132: client = SSLSocket(client)
--
To view, visit http://gerrit.ovirt.org/37746
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id1808bc9e27dde72b018c3be413f5b2066127982
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <stirabos at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Lev Veyde <lveyde at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stirabos at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <didi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list