diff --git a/tools/pydfu.py b/tools/pydfu.py
index a7adda37cc027511b89ee3135b0fee757b64b6f7..112e354ecf9cd6aab9f86a162fbc21ac12ba017e 100755
--- a/tools/pydfu.py
+++ b/tools/pydfu.py
@@ -62,7 +62,7 @@ __verbose = None
 __DFU_INTERFACE = 0
 
 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
     def get_string(dev, index):
         return usb.util.get_string(dev, 255, index)