kopia lustrzana https://github.com/micropython/micropython
tools/pydfu.py: Use getfullargspec instead of getargspec for newer pyusb
pyusb v1.0.2 warns about `getargspec` as being deprecated.pull/3940/head
rodzic
6e50df4e21
commit
feec0a6909
|
@ -62,7 +62,7 @@ __verbose = None
|
||||||
__DFU_INTERFACE = 0
|
__DFU_INTERFACE = 0
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
if 'length' in inspect.getargspec(usb.util.get_string).args:
|
if 'length' in inspect.getfullargspec(usb.util.get_string).args:
|
||||||
# PyUSB 1.0.0.b1 has the length argument
|
# PyUSB 1.0.0.b1 has the length argument
|
||||||
def get_string(dev, index):
|
def get_string(dev, index):
|
||||||
return usb.util.get_string(dev, 255, index)
|
return usb.util.get_string(dev, 255, index)
|
||||||
|
|
Ładowanie…
Reference in New Issue