From 4ed22b1594fd16d93fcdcaab7db8c467afd41fea Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 11 Aug 2017 08:19:37 +0200 Subject: on_http_error: properly wrap the function This fixes the API docs. --- gitlab/exceptions.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gitlab/exceptions.py') diff --git a/gitlab/exceptions.py b/gitlab/exceptions.py index 6c00129..fc2c162 100644 --- a/gitlab/exceptions.py +++ b/gitlab/exceptions.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +import functools + class GitlabError(Exception): def __init__(self, error_message="", response_code=None, @@ -223,6 +225,7 @@ def on_http_error(error): GitlabError """ def wrap(f): + @functools.wraps(f) def wrapped_f(*args, **kwargs): try: return f(*args, **kwargs) -- cgit v1.2.1