finish method does not have any arguments

This commit is contained in:
Alexander Kukushkin
2016-05-09 09:31:29 +02:00
parent f801a08974
commit 2adf593fb8
+3 -2
View File
@@ -46,9 +46,10 @@ class RestApiHandler(BaseHTTPRequestHandler):
self.wfile.write(body.encode('utf-8'))
def send_auth_request(self, body):
self._write_response(401, body, {'WWW-Authenticate': 'Basic realm=\"Patroni\"'})
headers = {'WWW-Authenticate': 'Basic realm="' + self.server.patroni.__class__.__name__ + '"'}
self._write_response(401, body, headers)
def finish(self, *args, **kwargs):
def finish(self):
try:
if not self.wfile.closed:
self.wfile.flush()