def _set_exposure_compensation(self, value):
    self._check_camera_open()
    try:
        if (not ((- 25) <= value <= 25)):
            raise PiCameraValueError(('Invalid exposure compensation value: %d (valid range -25..25)' % value))
    except TypeError:
        raise PiCameraValueError(('Invalid exposure compensation value: %s' % value))
    self._camera.control.params[mmal.MMAL_PARAMETER_EXPOSURE_COMP] = value
def _set_exposure_compensation(self, value):
    self._check_camera_open()
    try:
        if (not ((- 25) <= value <= 25)):
            raise PiCameraValueError(('Invalid exposure compensation value: %d (valid range -25..25)' % value))
    except TypeError:
        raise PiCameraValueError(('Invalid exposure compensation value: %s' % value))
    self._camera.control.params[mmal.MMAL_PARAMETER_EXPOSURE_COMP] = value