From ae7eb106d77f6ba61a0aaf14e773e06fa0bb99b7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 6 Nov 2015 20:36:06 -0500 Subject: Do not use a private name for public variables In the server case auditlog is used in the pipeline too, so make it public. Signed-off-by: Simo Sorce --- custodia/httpd/server.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/custodia/httpd/server.py b/custodia/httpd/server.py index 47c69ed..2d6de41 100644 --- a/custodia/httpd/server.py +++ b/custodia/httpd/server.py @@ -62,7 +62,7 @@ class ForkingHTTPServer(ForkingTCPServer): self.config = config if 'server_string' in self.config: self.server_string = self.config['server_string'] - self._auditlog = log.auditlog + self.auditlog = log.auditlog class ForkingUnixHTTPServer(ForkingHTTPServer): @@ -328,9 +328,9 @@ class HTTPRequestHandler(BaseHTTPRequestHandler): elif valid is True: valid_once = True if valid_once is not True: - self.server._auditlog.svc_access(self.__class__.__name__, - log.AUDIT_SVC_AUTH_FAIL, - request['client_id'], 'No auth') + self.server.auditlog.svc_access(self.__class__.__name__, + log.AUDIT_SVC_AUTH_FAIL, + request['client_id'], 'No auth') raise HTTPError(403) # auhz framework here @@ -342,10 +342,10 @@ class HTTPRequestHandler(BaseHTTPRequestHandler): if valid is not None: break if valid is not True: - self.server._auditlog.svc_access(self.__class__.__name__, - log.AUDIT_SVC_AUTHZ_FAIL, - request['client_id'], - request.get('path', '/')) + self.server.auditlog.svc_access(self.__class__.__name__, + log.AUDIT_SVC_AUTHZ_FAIL, + request['client_id'], + request.get('path', '/')) raise HTTPError(403) # Select consumer -- cgit