From c3c012e8dc1a02e52831a7bb7d8a906e1abb5921 Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Sat, 15 Mar 2025 17:59:33 +0100 Subject: [PATCH] fix pydfu.py script compat --- tools/pydfu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pydfu.py b/tools/pydfu.py index 10da6010c98c3..736c151c60c34 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -82,7 +82,7 @@ import inspect # Python 3 deprecated getargspec in favour of getfullargspec, but # Python 2 doesn't have the latter, so detect which one to use -getargspec = getattr(inspect, "getfullargspec", inspect.getargspec) +getargspec = getattr(inspect, "getfullargspec", getattr(inspect, "getargspec", None)) if "length" in getargspec(usb.util.get_string).args: # PyUSB 1.0.0.b1 has the length argument