##// END OF EJS Templates
httppeer: inline simplified _reqdata()...
Gregory Szorc -
r49742:426cf9d9 default
parent child Browse files
Show More
@@ -231,15 +231,6 b' def makev1commandrequest('
231 return req, cu, qs
231 return req, cu, qs
232
232
233
233
234 def _reqdata(req):
235 """Get request data, if any. If no data, returns None."""
236 if pycompat.ispy3:
237 return req.data
238 if not req.has_data():
239 return None
240 return req.get_data()
241
242
243 def sendrequest(ui, opener, req):
234 def sendrequest(ui, opener, req):
244 """Send a prepared HTTP request.
235 """Send a prepared HTTP request.
245
236
@@ -274,7 +265,7 b' def sendrequest(ui, opener, req):'
274 % b' %d bytes of commands arguments in headers'
265 % b' %d bytes of commands arguments in headers'
275 % hgargssize
266 % hgargssize
276 )
267 )
277 data = _reqdata(req)
268 data = req.data
278 if data is not None:
269 if data is not None:
279 length = getattr(data, 'length', None)
270 length = getattr(data, 'length', None)
280 if length is None:
271 if length is None:
General Comments 0
You need to be logged in to leave comments. Login now