From f7a298aa0bbe320e7c792c067ee12bca65c23ae8 Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Sun, 14 Jan 2024 12:13:24 +0100 Subject: [PATCH] [build] Fix DFU on recent Python versions and drop Python 2 --- build/device/dfu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/device/dfu.py b/build/device/dfu.py index 7245632ad..36df3a029 100644 --- a/build/device/dfu.py +++ b/build/device/dfu.py @@ -79,7 +79,7 @@ __DFU_INTERFACE = 0 # Python 3 deprecated getargspec in favour of getfullargspec, but # Python 2 doesn't have the latter, so detect which one to use import inspect -getargspec = getattr(inspect, 'getfullargspec', inspect.getargspec) +getargspec = getattr(inspect, 'getfullargspec', inspect.getfullargspec) if 'length' in getargspec(usb.util.get_string).args: # PyUSB 1.0.0.b1 has the length argument