Commit c503f318 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type.Utils: new non_publishable decorator

parent d1e7e284
......@@ -418,6 +418,19 @@ def fill_args_from_request(*optional_args):
return decorator(function)
return decorator
if six.PY3:
from ZPublisher import zpublish
non_publishable = zpublish(publish=False)
else:
def non_publishable(f):
"""Decorator to prevent method f from being publishable by Zope.
"""
del getattr(f, '__func__', f).__doc__
assert not f.__doc__
return f
_pylint_message_re = re.compile(
r'^(?P<type>[CRWEF]):\s*(?P<row>\d+),\s*(?P<column>\d+):\s*(?P<message>.*)$')
......
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