Skip to content

Commit

Permalink
[Fix] Replace finally statement by except BaseException to suppress a…
Browse files Browse the repository at this point in the history
…ll exceptions (#653)

Closes #651

Co-authored-by: Irit Katriel <[email protected]>
  • Loading branch information
fjosw and iritkatriel authored Jan 6, 2025
1 parent 2213cec commit ce202b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autograd/wrap_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def _wraps(f):
try:
f.__name__ = namestr.format(fun=get_name(fun), **kwargs)
f.__doc__ = docstr.format(fun=get_name(fun), doc=get_doc(fun), **kwargs)
except BaseException:
pass
finally:
return f

Expand Down

0 comments on commit ce202b9

Please sign in to comment.