Skip to content
Snippets Groups Projects
Commit 7311f651 authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Set milter_protocol attribute of noreply wrapper

parent 84bd61aa
Branches
Tags
No related merge requests found
...@@ -46,7 +46,7 @@ def nocallback(func): ...@@ -46,7 +46,7 @@ def nocallback(func):
def noreply(func): def noreply(func):
try: try:
nr_mask = func.milter_protocol = OPTIONAL_CALLBACKS[func.__name__][0] nr_mask = OPTIONAL_CALLBACKS[func.__name__][0]
except KeyErro: except KeyErro:
raise ValueError( raise ValueError(
'@noreply applied to non-optional method: '+func.__name__) '@noreply applied to non-optional method: '+func.__name__)
...@@ -54,6 +54,7 @@ def noreply(func): ...@@ -54,6 +54,7 @@ def noreply(func):
rc = func(self,*args) rc = func(self,*args)
if self._protocol & nr_mask: return NOREPLY if self._protocol & nr_mask: return NOREPLY
return rc return rc
wrapper.milter_protocol = nr_mask
return wrapper return wrapper
class DisabledAction(RuntimeError): class DisabledAction(RuntimeError):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment