Replace deprecated inspect.getargspec with inspect.getfullargspec
Python 3.11 removes inspect.getargspec completely.
This commit is contained in:
parent
4ab60c857d
commit
97fe88989c
1 changed files with 2 additions and 2 deletions
4
toast.py
4
toast.py
|
@ -107,7 +107,7 @@ class ToastMachine:
|
||||||
for k, v in self.machine.types.items():
|
for k, v in self.machine.types.items():
|
||||||
if self.machine.type == k:
|
if self.machine.type == k:
|
||||||
try:
|
try:
|
||||||
args = inspect.getargspec(v.__init__).args
|
args = inspect.getfullargspec(v.__init__).args
|
||||||
except:
|
except:
|
||||||
args = []
|
args = []
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ class ToastMachine:
|
||||||
if "default" in self.machine.types:
|
if "default" in self.machine.types:
|
||||||
if (
|
if (
|
||||||
"parent"
|
"parent"
|
||||||
in inspect.getargspec(
|
in inspect.getfullargspec(
|
||||||
self.machine.types["default"].__init__
|
self.machine.types["default"].__init__
|
||||||
).args
|
).args
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in a new issue