Skip to content

Commit

Permalink
Fixed bug in @wraps, caused by some strange python behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Jan 4, 2015
1 parent d22aaa0 commit 4b70e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

0.3.2
-----
- Fixed bug in @wraps, caused by some strange python behaviour.

0.3.1
-----
- Fixed bug in documentation.
Expand Down
6 changes: 3 additions & 3 deletions src/bottle_rest/bottle_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def handle_type_error(fn):
HTTPError: 400 in case too many/too little function parameters were \
given.
"""
def any_match(string_list, obj):
return filter(lambda x: x in obj, string_list)

@wraps(fn)
def handle_type_error_wrapper(*args, **kwargs):
def any_match(string_list, obj):
return filter(lambda x: x in obj, string_list)

try:
return fn(*args, **kwargs)
except TypeError as e:
Expand Down

0 comments on commit 4b70e88

Please sign in to comment.