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

def audit_rules::Field::parse_triple (   self,
  var_name,
  op_name,
  value,
  rule = None 
)

Parse the rule from elements.

Raise ParsingError on error.  The object state is undefined after an
error.  rule may be omitted if var_name never specifies
audit.AUDIT_ARCH.

Definition at line 303 of file audit_rules.py.

00303                                                                  :
        '''Parse the rule from elements.

        Raise ParsingError on error.  The object state is undefined after an
        error.  rule may be omitted if var_name never specifies
        audit.AUDIT_ARCH.

        '''
        self.var = audit.audit_name_to_field(var_name)
        if self.var == -1:
            raise ParsingError(_('Unknown field "%s"') % var_name)
        try:
            self.op = self.__op_name_map[op_name]
        except KeyError:
            raise ParsingError(_('Unknown operator "%s"') % op_name)
        self.value = self.get_field_type(self.var).parse_value(value, self.op,
                                                               rule)

    def parse(self, string, rule):


Generated by  Doxygen 1.6.0   Back to index