

def clean(self):
    delimiter = self.cleaned_data.get('delimiter')
    if delimiter.isdigit():
        try:
            unichr(int(delimiter))
            return int(delimiter)
        except ValueError:
            raise forms.ValidationError(_('Delimiter value must be smaller than 65533.'))
    if (not delimiter):
        raise forms.ValidationError(_('Delimiter value is required.'))
    _clean_terminator(delimiter)
    return self.cleaned_data

dataset/ETHPy150Open cloudera/hue/apps/beeswax/src/beeswax/forms.py CreateByImportDelimForm.clean/original