adb.usb_exceptions module¶
Common exceptions for ADB and Fastboot.
Contents
-
exception
adb.usb_exceptions.AdbCommandFailureException[source]¶ Bases:
ExceptionADB Command returned a FAIL.
-
exception
adb.usb_exceptions.AdbOperationException[source]¶ Bases:
ExceptionFailed to communicate over adb with device after multiple retries.
-
exception
adb.usb_exceptions.CommonUsbError[source]¶ Bases:
ExceptionBase class for usb communication errors.
-
exception
adb.usb_exceptions.DeviceAuthError(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsExceptionDevice authentication failed.
-
exception
adb.usb_exceptions.DeviceNotFoundError(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsExceptionDevice isn’t on USB.
-
exception
adb.usb_exceptions.FormatMessageWithArgumentsException(message, *args)[source]¶ Bases:
adb.usb_exceptions.CommonUsbErrorException that both looks good and is functional.
Okay, not that kind of functional, it’s still a class.
This interpolates the message with the given arguments to make it human-readable, but keeps the arguments in case other code try-excepts it.
- Parameters
message (str) – The error message
args (str) – Positional arguments for formatting
message
-
exception
adb.usb_exceptions.LibusbWrappingError(msg, usb_error)[source]¶ Bases:
adb.usb_exceptions.CommonUsbErrorWraps
libusb1errors while keeping their original usefulness.- Parameters
msg (str) – The error message
usb_error (libusb1.USBError) – An exception from
libusb1
-
usb_error¶ An exception from
libusb1- Type
libusb1.USBError
-
exception
adb.usb_exceptions.ReadFailedError(msg, usb_error)[source]¶ Bases:
adb.usb_exceptions.LibusbWrappingErrorRaised when the device doesn’t respond to our commands.
-
exception
adb.usb_exceptions.TcpTimeoutException(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsExceptionTCP connection timed out in the time out given.
-
exception
adb.usb_exceptions.WriteFailedError(msg, usb_error)[source]¶ Bases:
adb.usb_exceptions.LibusbWrappingErrorRaised when the device doesn’t accept our command.