mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Drop support for cancellable as a positional argument
Better to be explicit for the rare cases where a single operation needs a specific Cancellable.
This commit is contained in:
@@ -18,12 +18,6 @@ Cancellable = _frida.Cancellable
|
||||
def cancellable(f):
|
||||
@wraps(f)
|
||||
def wrapper(*args, cancellable=None, **kwargs):
|
||||
if cancellable is None:
|
||||
last_arg = args[-1]
|
||||
if isinstance(last_arg, Cancellable):
|
||||
cancellable = last_arg
|
||||
args = args[:-1]
|
||||
|
||||
if cancellable is None:
|
||||
return f(*args, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user