Use functools.wraps for noreply decorator

This commit is contained in:
Stuart Gathman
2012-08-28 19:42:05 +00:00
parent 594d3ad365
commit 7502c29e47
+2
View File
@@ -15,6 +15,7 @@ import milter
import thread
from milter import *
from functools import wraps
_seq_lock = thread.allocate_lock()
_seq = 0
@@ -157,6 +158,7 @@ def noreply(func):
except KeyError:
raise ValueError(
'@noreply applied to non-optional method: '+func.__name__)
@wraps(func)
def wrapper(self,*args):
rc = func(self,*args)
if self._protocol & nr_mask: