diff options
author | Ray Holder <ray.holder+github@gmail.com> | 2014-11-09 20:43:07 -0600 |
---|---|---|
committer | Ray Holder <ray.holder+github@gmail.com> | 2014-11-09 20:43:07 -0600 |
commit | 8fd859896a2e7181515f8f5a924085dcf3613d00 (patch) | |
tree | fd2f91e576ad42eee9d0ddaef0e6e96865c671ac | |
parent | ad35b7e2401574d0e49bce04712f73ad03750a15 (diff) | |
parent | ee2ae2a9d309132ad7ad2a354f4e3926377634d9 (diff) | |
download | retrying-8fd859896a2e7181515f8f5a924085dcf3613d00.tar.gz |
Merge pull request #21 from harlowja/wraps
Ensure we wrap the decorated functions
-rw-r--r-- | retrying.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/retrying.py b/retrying.py index 9f0a2a0..7a00a8d 100644 --- a/retrying.py +++ b/retrying.py @@ -55,6 +55,8 @@ def retry(*dargs, **dkw): # support both @retry and @retry() as valid syntax if len(dargs) == 1 and callable(dargs[0]): def wrap_simple(f): + + @six.wraps(f) def wrapped_f(*args, **kw): return Retrying().call(f, *args, **kw) @@ -64,6 +66,8 @@ def retry(*dargs, **dkw): else: def wrap(f): + + @six.wraps(f) def wrapped_f(*args, **kw): return Retrying(*dargs, **dkw).call(f, *args, **kw) |