浏览代码

just a small logging fix so that we got 'anonymous user' in logs instead of calendar owner if user is not authenticated

Łukasz Mierzwa 15 年之前
父节点
当前提交
d49776af8d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      radicale/__init__.py

+ 1 - 1
radicale/__init__.py

@@ -177,7 +177,7 @@ class Application(object):
                 log.LOGGER.info("%s allowed" % calendar.owner)
                 status, headers, answer = function(environ, calendar, content)
             else:
-                log.LOGGER.info("%s refused" % calendar.owner)
+                log.LOGGER.info("%s refused" % (user or "anonymous user"))
                 status = client.UNAUTHORIZED
                 headers = {
                     "WWW-Authenticate":