From 5b07d2de3006e9cdd6dd21246b6f1c90c5879d9d Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 3 May 2019 16:34:54 +0300 Subject: [PATCH] httplib status codes constants in response --- src/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.py b/src/api.py index ee7c05fa..7f56b600 100644 --- a/src/api.py +++ b/src/api.py @@ -266,11 +266,11 @@ class BMXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): ) except Exception: # This should only happen if the module is buggy # internal error, report as HTTP server error - self.send_response(500) + self.send_response(httplib.INTERNAL_SERVER_ERROR) self.end_headers() else: # got a valid XML RPC response - self.send_response(200) + self.send_response(httplib.OK) self.send_header("Content-type", self.server.content_type) self.send_header("Content-length", str(len(response)))