changeset 6070:2e0530a78920

use pagename as argument instead of name
author 'Karl O. Pinc' <kop@meme.com>
date Mon, 15 Sep 2014 20:48:41 -0500
parents 0e1b5fdca6bc
children 751214fa01d7
files MoinMoin/util/abuse.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/abuse.py	Mon Sep 15 12:02:20 2014 -0500
+++ b/MoinMoin/util/abuse.py	Mon Sep 15 20:48:41 2014 -0500
@@ -14,7 +14,7 @@
 logging = log.getLogger(__name__)
 
 
-def log_attempt(system, success, request=None, username=None, page=None):
+def log_attempt(system, success, request=None, username=None, pagename=None):
     """
     log attempts to use <system>, log success / failure / username / ip
 
@@ -23,7 +23,7 @@
     @param success: whether the attempt was successful
     @param request: request object (optional, to determine remote's ip address)
     @param username: user's name (optional, if None: determined from request)
-    @param page: name of the page (optional)
+    @param pagename: name of the page (optional)
     """
     if username is None:
         if request and hasattr(request, 'user') and request.user.valid:
@@ -34,4 +34,4 @@
     msg = """%s status: %s username: "%s" ip: %s page: %s"""
     status = ("failure", "success")[success]
     ip = request and request.remote_addr or 'unknown'
-    logging.log(level, msg, system, status, username, ip, page)
+    logging.log(level, msg, system, status, username, ip, pagename)