

def clean_cache_path(self):
    'Validate that the cache_path field is provided if required.'
    cache_path = self.cleaned_data['cache_path'].strip()
    if (self.fields['cache_path'].required and (not cache_path)):
        raise ValidationError(_('A valid cache path must be provided.'))
    return cache_path

dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/admin/forms.py GeneralSettingsForm.clean_cache_path/original