File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,11 @@ def jloads(json_string):
102
102
class ProtocolError (Exception ):
103
103
pass
104
104
105
- class Transport ( XMLTransport ):
105
+ class TransportMixIn ( object ):
106
106
""" Just extends the XMLRPC transport where necessary. """
107
107
user_agent = config .user_agent
108
+ # for Python 2.7 support
109
+ _connection = None
108
110
109
111
def send_content (self , connection , request_body ):
110
112
connection .putheader ("Content-Type" , "application/json-rpc" )
@@ -137,12 +139,12 @@ def feed(self, data):
137
139
def close (self ):
138
140
return '' .join (self .data )
139
141
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
145
144
145
+ class SafeTransport (TransportMixIn , XMLSafeTransport ):
146
+ pass
147
+
146
148
class ServerProxy (XMLServerProxy ):
147
149
"""
148
150
Unfortunately, much more of this class has to be copied since
You can’t perform that action at this time.
0 commit comments