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

def auditd_config::AuditdConfig::__tokenize_line (   line  )  [private]

Split a line into tokens.

Return the token array, with a[1] == '=', or None if the line contains
no tokens.  Raise ParsingError on error.

Definition at line 109 of file auditd_config.py.

00109                              :
        '''Split a line into tokens.

        Return the token array, with a[1] == '=', or None if the line contains
        no tokens.  Raise ParsingError on error.

        '''
        # Avoid empty leading and trailing empty strings in the split
        # result if line starts or ends with spaces
        line = line.strip(' ')
        if not line or line.startswith('#'):
            return None
        a = AuditdConfig.__whitespace_re.split(line)
        if len(a) < 3 or len(a) > 4:
            raise ParsingError('Invalid number of tokens')
        if a[1] != '=':
            raise ParsingError('Missing equal sign')
        return a

    @staticmethod
    def __parse_action(value, value2):


Generated by  Doxygen 1.6.0   Back to index