Skip to content

Commit a0cd626

Browse files
author
Josh Marshall
committed
Initial SSL modifications for client.
1 parent 4a8dbe4 commit a0cd626

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

jsonrpclib/jsonrpc.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ def jloads(json_string):
102102
class ProtocolError(Exception):
103103
pass
104104

105-
class Transport(XMLTransport):
105+
class TransportMixIn(object):
106106
""" Just extends the XMLRPC transport where necessary. """
107107
user_agent = config.user_agent
108+
# for Python 2.7 support
109+
_connection = None
108110

109111
def send_content(self, connection, request_body):
110112
connection.putheader("Content-Type", "application/json-rpc")
@@ -137,12 +139,12 @@ def feed(self, data):
137139
def close(self):
138140
return ''.join(self.data)
139141

140-
class SafeTransport(XMLSafeTransport):
141-
""" Just extends for HTTPS calls """
142-
user_agent = Transport.user_agent
143-
send_content = Transport.send_content
144-
getparser = Transport.getparser
142+
class Transport(TransportMixIn, XMLTransport):
143+
pass
145144

145+
class SafeTransport(TransportMixIn, XMLSafeTransport):
146+
pass
147+
146148
class ServerProxy(XMLServerProxy):
147149
"""
148150
Unfortunately, much more of this class has to be copied since

0 commit comments

Comments
 (0)