Skip to content

Commit

Permalink
Add spaces after commas in parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
klondi committed Nov 14, 2015
1 parent 641ef55 commit 895d5a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,14 +649,14 @@ def _config(key, arg):
else:
self.connect()

def _create_ssl_ctx(self,sslp):
if isinstance(sslp,ssl.SSLContext):
def _create_ssl_ctx(self, sslp):
if isinstance(sslp, ssl.SSLContext):
return sslp
ca = sslp.get('ca')
capath = sslp.get('capath')
hasnoca = ca is None and capath is None
ctx = ssl.create_default_context(cafile=ca,capath=capath)
ctx.check_hostname = not hasnoca and sslp.get('check_hostname',True)
ctx = ssl.create_default_context(cafile=ca, capath=capath)
ctx.check_hostname = not hasnoca and sslp.get('check_hostname', True)
ctx.verify_mode = ssl.CERT_NONE if hasnoca else ssl.CERT_REQUIRED
if 'cert' in sslp:
ctx.load_cert_chain(sslp['cert'], keyfile=sslp.get('key'))
Expand Down Expand Up @@ -1019,7 +1019,7 @@ def _request_authentication(self):
if DEBUG: dump_packet(data)
self._write_bytes(data)

self.socket = self.ctx.wrap_socket(self.socket,server_hostname=self.host)
self.socket = self.ctx.wrap_socket(self.socket, server_hostname=self.host)
self._rfile = _makefile(self.socket, 'rb')

data = data_init + self.user + b'\0' + \
Expand Down

0 comments on commit 895d5a2

Please sign in to comment.