summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-11-06 20:36:06 -0500
committerSimo Sorce <simo@redhat.com>2015-11-06 20:55:10 -0500
commitae7eb106d77f6ba61a0aaf14e773e06fa0bb99b7 (patch)
treea3533142a6598cb37637504aad20e23806af4756
parentb7ae9722867f1550a94a759c27ba14f470b5dc75 (diff)
downloadcustodia-ae7eb106d77f6ba61a0aaf14e773e06fa0bb99b7.tar.gz
custodia-ae7eb106d77f6ba61a0aaf14e773e06fa0bb99b7.tar.xz
custodia-ae7eb106d77f6ba61a0aaf14e773e06fa0bb99b7.zip
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 <simo@redhat.com>
-rw-r--r--custodia/httpd/server.py16
1 files 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