Logo Search packages:      
Sourcecode: audit version File versions  Download package

def global_dialog::GlobalDialog::__validate_action_mail_acct (   email  )  [private]

Validate the "action_mail_acct" setting.

Return an error message, or None if no error is detected.

Definition at line 347 of file global_dialog.py.

00347                                           :
        '''Validate the "action_mail_acct" setting.

        Return an error message, or None if no error is detected.

        '''
        if len(email) < 2:
            return _('"%s" is too short') % email
        for c in email:
            if (c not in string.ascii_letters and c not in string.digits and
                c not in '@.-_'):
                return (_('"%(email)s" contains an invalid character "%(char)c"') %
                        {'email': email, 'char': c})
        i = email.find('@')
        if i != -1 and email.find('.', i) == -1:
            return _('The domain in "%s" is not fully qualified') % email
        # FIXME? gethostbyname check omitted
        return None

    @staticmethod
    def __validate_dispatcher(path):


Generated by  Doxygen 1.6.0   Back to index