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

def audit_rules::Field::parse (   self,
  string,
  rule 
)

Parse the rule from a string representation.

Raise ParsingError on error.  The object state is undefined after an
error.

Definition at line 321 of file audit_rules.py.

00321                                  :
        '''Parse the rule from a string representation.

        Raise ParsingError on error.  The object state is undefined after an
        error.

        '''
        # To avoid ambiguities, check the longest operators first.
        for op in sorted(self.__op_name_map.iterkeys(), key = len,
                         reverse = True):
            i = string.find(op)
            if i != -1:
                (var, value) = (string[:i], string[(i + len(op)):])
                break
        else:
            raise ParsingError(_('Operator missing in "%s"') % string)
        self.parse_triple(var, op, value, rule)

    def parse_special(self, var, string):


Generated by  Doxygen 1.6.0   Back to index