summaryrefslogtreecommitdiff
path: root/tools/pydfu.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pydfu.py')
-rwxr-xr-xtools/pydfu.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/pydfu.py b/tools/pydfu.py
index cd7354818..8822b07be 100755
--- a/tools/pydfu.py
+++ b/tools/pydfu.py
@@ -75,11 +75,7 @@ __verbose = None
# USB DFU interface
__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
-getargspec = getattr(inspect, "getfullargspec", getattr(inspect, "getargspec", None))
-
-if "length" in 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
def get_string(dev, index):
return usb.util.get_string(dev, 255, index)