تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1168 أدوات العرض

I want to locally override _response method of class JsonRPCDispatcher in http.py.

​class JsonRPCDispatcher(Dispatcher):
​routing_type = 'json'

​def _response(self, result=None, error=None):
​response = {'jsonrpc': '2.0', 'id': self.request_id}
​if error is not None:
​response['error'] = error
​if result is not None:
​response['result'] = result

​return self.request.make_json_response(response)

I want to replace the whole method locally. How to do this?​

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 23
4294
0
أبريل 17
3073
2
أغسطس 23
4093
2
يوليو 22
6531
1
مارس 15
272