summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-05-26 18:16:33 +0000
committerGerrit Code Review <review@openstack.org>2021-05-26 18:16:33 +0000
commit0bc8a2e70faaf8600a44c6e7e366d2296adc128b (patch)
treed8e65a7f681ecabafd0bfd3041410db66a956c8b
parent5713170c3e2efd2d66a03533bfd7a82b3c401f7e (diff)
parenta339e5d4cfcab52dbece47f91b19ca0a34f21603 (diff)
downloadoslo-policy-0bc8a2e70faaf8600a44c6e7e366d2296adc128b.tar.gz
Merge "Replace getargspec with getfullargspec"3.8.1
-rw-r--r--oslo_policy/_checks.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/oslo_policy/_checks.py b/oslo_policy/_checks.py
index c813af6..3d00e6f 100644
--- a/oslo_policy/_checks.py
+++ b/oslo_policy/_checks.py
@@ -21,11 +21,6 @@ import inspect
import stevedore
-if hasattr(inspect, 'getfullargspec'):
- getargspec = inspect.getfullargspec
-else:
- getargspec = inspect.getargspec
-
registered_checks = {}
extension_checks = None
@@ -77,7 +72,7 @@ def _check(rule, target, creds, enforcer, current_rule):
"""
# Evaluate the rule
- argspec = getargspec(rule.__call__)
+ argspec = inspect.getfullargspec(rule.__call__)
rule_args = [target, creds, enforcer]
# Check if the rule argument must be included or not
if len(argspec.args) > 4: