def clean_logging_directory(self):
        logging_dir = self.cleaned_data['logging_directory']

        if not os.path.exists(logging_dir):
            raise ValidationError(_("This path does not exist."))

        if not os.path.isdir(logging_dir):
            raise ValidationError(_("This is not a directory."))

        if not os.access(logging_dir, os.W_OK):
            raise ValidationError(
                _("This path is not writable by the web server."))

        return logging_dir
Validate that the logging_directory path is valid.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/admin/forms.py/LoggingSettingsForm.clean_logging_directory