Skip to content

Commit c3c012e

Browse files
committed
fix pydfu.py script compat
1 parent 4107246 commit c3c012e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pydfu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
import inspect
8383
# Python 3 deprecated getargspec in favour of getfullargspec, but
8484
# Python 2 doesn't have the latter, so detect which one to use
85-
getargspec = getattr(inspect, "getfullargspec", inspect.getargspec)
85+
getargspec = getattr(inspect, "getfullargspec", getattr(inspect, "getargspec", None))
8686

8787
if "length" in getargspec(usb.util.get_string).args:
8888
# PyUSB 1.0.0.b1 has the length argument

0 commit comments

Comments
 (0)