Skip to content

Commit

Permalink
slcan: fixed support for python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Feb 21, 2023
1 parent c452504 commit 40f76b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dronecan/driver/slcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,10 @@ def __init__(self, device_name, **kwargs):

# Removing all unused stuff, because it breaks inter process communications.
kwargs = copy.copy(kwargs)
keep_keys = inspect.getargspec(_io_process).args
if hasattr(inspect, 'getargspec'):
keep_keys = inspect.getargspec(_io_process).args
else:
keep_keys = inspect.getfullargspec(_io_process).args
for key in list(kwargs.keys()):
if key not in keep_keys:
del kwargs[key]
Expand Down

0 comments on commit 40f76b6

Please sign in to comment.