mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
py3: ipa_otptoken_import: fix lamba code inspection
lambda in py3 has '__code__' attribute instead of 'func_code' https://pagure.io/freeipa/issue/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
parent
8416d5772d
commit
24eadd3a39
@ -378,7 +378,10 @@ class PSKCKeyPackage(object):
|
||||
|
||||
result = fetch(element, path)
|
||||
if result is not None:
|
||||
if getattr(getattr(v[1], "func_code", None), "co_argcount", 0) > 1:
|
||||
lambda_code_attr = "__code__" if six.PY3 else "func_code"
|
||||
if getattr(
|
||||
getattr(v[1], lambda_code_attr, None),
|
||||
"co_argcount", 0) > 1:
|
||||
data[v[0]] = v[1](result, decryptor)
|
||||
else:
|
||||
data[v[0]] = v[1](result)
|
||||
|
Loading…
Reference in New Issue
Block a user