10000 on_http_error: properly wrap the function · allamand/python-gitlab@4ed22b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ed22b1

Browse files
author
Gauvain Pocentek
committed
on_http_error: properly wrap the function
This fixes the API docs.
1 parent d1e7cc7 commit 4ed22b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitlab/exceptions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18+
import functools
19+
1820

1921
class GitlabError(Exception):
2022
def __init__(self, error_message="", response_code=None,
@@ -223,6 +225,7 @@ def on_http_error(error):
223225
GitlabError
224226
"""
225227
def wrap(f):
228+
@functools.wraps(f)
226229
def wrapped_f(*args, **kwargs):
227230
try:
228231
return f(*args, **kwargs)

0 commit comments

Comments
 (0)
0