Skip to content

Commit b4c0215

Browse files
committed
Do not abbreviate ssl_context in attribute
1 parent f717aef commit b4c0215

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ good-names =
5050
b, c, d, e, f, g, h, i, j, k, m, n, p, q, r, s, t, ,v, w, x, y,
5151
db, dt, fd, fp, fs, ip, ok, tm, ts, wr,
5252
dir_, id_, input_, type_,
53-
allow_none, entry_point, has_key, start_response, ssl_ctx,
53+
allow_none, entry_point, has_key, start_response, ssl_context,
5454
memcache, redis,
5555
index, webware, MixIn,
5656
simple, test1, test2, test3, test4, test5, test5join1, test5join2,

webware/MiscUtils/M2PickleRPC.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@ class M2Transport(Transport):
2020
user_agent = f"M2PickleRPC.py/{__version__} - {Transport.user_agent}"
2121

2222
def __init__(self, ssl_context=None):
23-
if ssl_context is None:
24-
self.ssl_ctx = SSL.Context('sslv23')
25-
else:
26-
self.ssl_ctx = ssl_context
23+
self.ssl_context = ssl_context or SSL.Context('sslv23')
2724

2825
def make_connection(self, host, port=None):
2926
if port is None:
3027
host, port = m2urllib.splitport(host)
31-
return httpslib.HTTPS(host, int(port), ssl_context=self.ssl_ctx)
28+
return httpslib.HTTPS(host, int(port), ssl_context=self.ssl_context)
3229

3330
# Workarounds below are necessary because M2Crypto seems to
3431
# return from fileobject.read() early! So we have to call it

0 commit comments

Comments
 (0)