forked from MarseyWorld/MarseyWorld
sanitize.with_sigalrm_timeout: functools.wrap fix.
parent
548030fcf1
commit
b66bfdcab9
|
@ -172,7 +172,7 @@ def with_sigalrm_timeout(timeout: int):
|
||||||
raise Exception("Timeout")
|
raise Exception("Timeout")
|
||||||
|
|
||||||
def inner(func):
|
def inner(func):
|
||||||
@functools.wraps(inner)
|
@functools.wraps(func)
|
||||||
def wrapped(*args, **kwargs):
|
def wrapped(*args, **kwargs):
|
||||||
signal.signal(signal.SIGALRM, sig_handler)
|
signal.signal(signal.SIGALRM, sig_handler)
|
||||||
signal.alarm(timeout)
|
signal.alarm(timeout)
|
||||||
|
|
Loading…
Reference in New Issue