Skip to content

Commit af04a2c

Browse files
committed
Fix codacy issues
1 parent 6e14dc7 commit af04a2c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

rethinkdb/gevent_net/net_gevent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ def __init__(self, parent):
104104
self._socket.close()
105105
raise ReqlDriverError("SSL handshake failed (see server log for more information): %s" % str(exc))
106106
try:
107-
ssl.match_hostname(self._socket.getpeercert(), hostname=get_hostname_for_ssl_match(self.host))
107+
ssl.match_hostname(
108+
self._socket.getpeercert(),
109+
hostname=get_hostname_for_ssl_match(self.host)
110+
)
108111
except ssl.CertificateError:
109112
self._socket.close()
110113
raise

rethinkdb/net.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,10 @@ def __init__(self, parent, timeout):
353353
"SSL handshake failed (see server log for more information): %s" %
354354
str(err))
355355
try:
356-
357-
match_hostname(self._socket.getpeercert(), hostname=get_hostname_for_ssl_match(self.host))
356+
ssl.match_hostname(
357+
self._socket.getpeercert(),
358+
hostname=get_hostname_for_ssl_match(self.host)
359+
)
358360
except CertificateError:
359361
self._socket.close()
360362
raise

0 commit comments

Comments
 (0)