summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurizio Lombardi <mlombard@redhat.com>2022-07-08 09:39:31 +0200
committerGitHub <noreply@github.com>2022-07-08 09:39:31 +0200
commita1c53977024ba330a573cc09d44b94ff0db272b7 (patch)
tree16189e90174196bda36433df2f928b58678ca021
parentb4923ee5591d8b980003150e0ba6ffe512d8c9da (diff)
parentf3ac914861bd605e3d634aeeb5e706abdbd39259 (diff)
downloadconfigshell-fb-a1c53977024ba330a573cc09d44b94ff0db272b7.tar.gz
Merge pull request #64 from maurizio-lombardi/python3.11
Python3.11: replace getargspec() with getfullargspec()
-rw-r--r--configshell/node.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/configshell/node.py b/configshell/node.py
index 6af8642..811a730 100644
--- a/configshell/node.py
+++ b/configshell/node.py
@@ -1417,10 +1417,10 @@ class ConfigNode(object):
@type kparams: dict
@raise ExecutionError: When the check fails.
'''
- spec = inspect.getargspec(method)
+ spec = inspect.getfullargspec(method)
args = spec.args[1:]
pp = spec.varargs
- kw = spec.keywords
+ kw = spec.varkw
if spec.defaults is None:
nb_opt_params = 0
@@ -1460,7 +1460,7 @@ class ConfigNode(object):
"Missing required parameters %s"
% ", ".join("'%s'" % missing for missing in missing_params))
- if spec.keywords is None:
+ if kw is None:
if len(unexpected_keywords) == 1:
raise ExecutionError(
"Unexpected keyword parameter '%s'."