Skip to content

Commit 71e62fa

Browse files
author
Rakshith Bhyravabhotla
authored
Un-use deprecated method in devtools (Azure#7222)
* Un-use deprecated method * make it python 2 compatible
1 parent a1c2a91 commit 71e62fa

File tree

1 file changed

+4
-1
lines changed
  • tools/azure-devtools/src/azure_devtools/scenario_tests

1 file changed

+4
-1
lines changed

tools/azure-devtools/src/azure_devtools/scenario_tests/utilities.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def trim_kwargs_from_test_function(fn, kwargs):
7070
# the next function is the actual test function. the kwargs need to be trimmed so
7171
# that parameters which are not required will not be passed to it.
7272
if not is_preparer_func(fn):
73-
args, _, kw, _ = inspect.getargspec(fn) # pylint: disable=deprecated-method
73+
try:
74+
args, _, kw, _, _, _, _ = inspect.getfullargspec(fn)
75+
except AttributeError:
76+
args, _, kw, _ = inspect.getargspec(fn) # pylint: disable=deprecated-method
7477
if kw is None:
7578
args = set(args)
7679
for key in [k for k in kwargs if k not in args]:

0 commit comments

Comments
 (0)