Fix ProxyAwareTransport: set self.verbose before parse_response
Transport.parse_response() accesses self.verbose for debug logging but it is never initialized unless the standard single_request() flow runs. Our custom request() bypassed that, causing AttributeError on every call. Fix: assign self.verbose = verbose before calling self.parse_response().
This commit is contained in:
@@ -34,6 +34,7 @@ class ProxyAwareTransport(xmlrpc.client.SafeTransport):
|
||||
opener = urllib.request.build_opener(urllib.request.ProxyHandler())
|
||||
try:
|
||||
with opener.open(req, timeout=30) as resp:
|
||||
self.verbose = verbose # required by Transport.parse_response
|
||||
return self.parse_response(resp)
|
||||
except urllib.error.HTTPError as e:
|
||||
raise xmlrpc.client.ProtocolError(url, e.code, e.msg, dict(e.headers))
|
||||
|
||||
Reference in New Issue
Block a user