Provide _unauthorized method to TimerResponse to silence console messages like:

2011-03-11 10:38:25 ERROR ZPublisher BeforeTraverse: Error while invoking hook: "acl_users"
Traceback (most recent call last):
  File "eggs/Zope2-2.12.15-py2.6-linux-x86_64.egg/ZPublisher/BeforeTraverse.py", line 145, in __call__
    meth(*(container, request, None)[:args])
  File "eggs/Products.PluggableAuthService-1.7.3-py2.6.egg/Products/PluggableAuthService/PluggableAuthService.py", line 1008, in __call__
    stack.append(resp._unauthorized)
AttributeError: TimerResponse instance has no attribute '_unauthorized'



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44174 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3956a3d8
#!/usr/bin/env python
modname = 'timerserver'
version = open('version.txt').read().strip()
......@@ -15,7 +16,7 @@ long_desc = short_desc
web = ""
ftp = ""
mailing_list = ""
#!/usr/bin/env python
import sys
try:
from setuptools import setup
......
......@@ -105,6 +105,9 @@ class TimerResponse(BaseResponse):
def unauthorized(self):
pass
def _unauthorized(self):
pass
# This is taken from ZPublisher.HTTPResponse
# I don't think it's safe to make TimerResponse a subclass of HTTPResponse,
# so I inline here the method . This is required it you want unicode page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment