(func)
return wrapper
Decorator for checking whether the device description is available on a
    device.
Decorator for checking whether the device description is available on a
    device.
Decorator for checking whether the device description is available on a device .
def _device_description_required(func):
    """Decorator for checking whether the device description is available on a
    device.

    """
    @wraps(func)
    def wrapper(device, *args, **kwargs):
        if device.description is None:
            raise NotRetrievedError(
                'No device description retrieved for this device.')
        elif device.description == NotAvailableError:
            return
        return func(device, *args, **kwargs)

    return wrapper
def _device_description_required ( func ) : @ wraps ( func ) def wrapper ( device , * args , * * kwargs ) : if device . description is None : raise NotRetrievedError ( 'No device description retrieved for this device.' ) elif device . description == NotAvailableError : return return func ( device , * args , * * kwargs ) return wrapper