Skip to content

Exceptions

busylight_core.exceptions

Busylight Exceptions

Classes

busylight_core.exceptions.LightUnavailableError

LightUnavailableError(light)

Bases: _BaseLightError

Previously accessible light is now not accessible.

Initialize with the light instance that became unavailable.

Source code in src/busylight_core/exceptions.py
def __init__(self, light: Light) -> None:
    """Initialize with the light instance that became unavailable."""
    self.light = light
Attributes
busylight_core.exceptions.LightUnavailableError.light instance-attribute
light = light
busylight_core.exceptions.LightUnavailableError.light_subclass instance-attribute
light_subclass = light_subclass

busylight_core.exceptions.HardwareUnsupportedError

HardwareUnsupportedError(hardware, light_subclass)

Bases: _BaseLightError

The hardware supplied is not supported by this class.

Initialize with the unsupported hardware and light class.

Source code in src/busylight_core/exceptions.py
def __init__(self, hardware: Hardware, light_subclass: type[Light]) -> None:
    """Initialize with the unsupported hardware and light class."""
    self.hardware = hardware
    self.light_subclass = light_subclass
Attributes
busylight_core.exceptions.HardwareUnsupportedError.hardware instance-attribute
hardware = hardware
busylight_core.exceptions.HardwareUnsupportedError.light_subclass instance-attribute
light_subclass = light_subclass

busylight_core.exceptions.NoLightsFoundError

NoLightsFoundError(light_subclass)

Bases: _BaseLightError

No lights were discovered by this Light subclass.

Source code in src/busylight_core/exceptions.py
def __init__(self, light_subclass: type[Light]) -> None:
    self.light_subclass = light_subclass
Attributes
busylight_core.exceptions.NoLightsFoundError.light_subclass instance-attribute
light_subclass = light_subclass

busylight_core.exceptions.InvalidHardwareError

InvalidHardwareError(device_description)

Bases: _BaseHardwareError

The device dictionary is missing required key/value pairs.

Initialize with the invalid device description.

Source code in src/busylight_core/exceptions.py
def __init__(self, device_description: dict) -> None:
    """Initialize with the invalid device description."""
    self.device_description = device_description
Attributes
busylight_core.exceptions.InvalidHardwareError.device_description instance-attribute
device_description = device_description
busylight_core.exceptions.InvalidHardwareError.hardware instance-attribute
hardware = hardware

busylight_core.exceptions.HardwareAlreadyOpenError

HardwareAlreadyOpenError(hardware)

Bases: _BaseHardwareError

The hardware device is already open and cannot be opened again.

Source code in src/busylight_core/exceptions.py
def __init__(self, hardware: Hardware) -> None:
    self.hardware = hardware
Attributes
busylight_core.exceptions.HardwareAlreadyOpenError.hardware instance-attribute
hardware = hardware

busylight_core.exceptions.HardwareNotOpenError

HardwareNotOpenError(hardware)

Bases: _BaseHardwareError

The hardware device is not open and cannot be used.

Source code in src/busylight_core/exceptions.py
def __init__(self, hardware: Hardware) -> None:
    self.hardware = hardware
Attributes
busylight_core.exceptions.HardwareNotOpenError.hardware instance-attribute
hardware = hardware