adb.usb_exceptions module¶
Common exceptions for ADB and Fastboot.
Contents
-
exception
adb.usb_exceptions.
AdbCommandFailureException
[source]¶ Bases:
Exception
ADB Command returned a FAIL.
-
exception
adb.usb_exceptions.
AdbOperationException
[source]¶ Bases:
Exception
Failed to communicate over adb with device after multiple retries.
-
exception
adb.usb_exceptions.
CommonUsbError
[source]¶ Bases:
Exception
Base class for usb communication errors.
-
exception
adb.usb_exceptions.
DeviceAuthError
(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsException
Device authentication failed.
-
exception
adb.usb_exceptions.
DeviceNotFoundError
(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsException
Device isn’t on USB.
-
exception
adb.usb_exceptions.
FormatMessageWithArgumentsException
(message, *args)[source]¶ Bases:
adb.usb_exceptions.CommonUsbError
Exception 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.CommonUsbError
Wraps
libusb1
errors 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.LibusbWrappingError
Raised when the device doesn’t respond to our commands.
-
exception
adb.usb_exceptions.
TcpTimeoutException
(message, *args)[source]¶ Bases:
adb.usb_exceptions.FormatMessageWithArgumentsException
TCP connection timed out in the time out given.
-
exception
adb.usb_exceptions.
WriteFailedError
(msg, usb_error)[source]¶ Bases:
adb.usb_exceptions.LibusbWrappingError
Raised when the device doesn’t accept our command.