Fix a Python 2.x compatibility regression

This commit is contained in:
Ole André Vadla Ravnås
2019-09-04 01:54:06 +02:00
parent fd563fb312
commit 870199d9e7
+2 -1
View File
@@ -17,7 +17,8 @@ _Cancellable = _frida.Cancellable
def cancellable(f):
@wraps(f)
def wrapper(*args, cancellable=None, **kwargs):
def wrapper(*args, **kwargs):
cancellable = kwargs.pop('cancellable', None)
if cancellable is not None:
with cancellable:
return f(*args, **kwargs)