Skip to content
Snippets Groups Projects
Commit b3aa6ec8 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

masking proxy: use StorageInterface signature in _getter_filtering_arguments

inspect.getcallargs will return `args`/`kwargs` unless the method is
wrapped using `functools.wraps` at every layer, and all the signatures
are compatible, which is apparently not the case for all proxies.
parent 366680cd
No related branches found
Tags v2.2.2
1 merge request!1121RPC server: ensure MaskedObjectExceptions can be encoded
Pipeline #8234 passed
......@@ -370,9 +370,10 @@ class MaskingProxyStorage:
if result is None:
return None
parsed_args = inspect.getcallargs(method, *args, **kwargs)
signature = inspect.signature(getattr(StorageInterface, method_name))
bound_args = signature.bind(self, *args, **kwargs)
self._raise_if_masked_swhids(
self._get_swhids_in_args(method_name, parsed_args)
self._get_swhids_in_args(method_name, bound_args.arguments)
)
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment