Skip to content

Commit

Permalink
[build] Fix DFU on recent Python versions and drop Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaya-Cout committed Jan 14, 2024
1 parent 5b87721 commit f7a298a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/device/dfu.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
# 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
Expand Down

0 comments on commit f7a298a

Please sign in to comment.