Exemple #1
0
    def _check_args(self):
        if self.direction is not None and \
                not is_valid_direction(self.direction):
            raise Exception("Invalid direction: %s" % self.direction)

        for k in self._match_kwargs:
            if k in [DIRECTION_REG, IMSI_REG]:
                raise Exception("Register %s should not be directly set" % k)
Exemple #2
0
    def _check_args(self):
        if self.direction is not None and \
                not is_valid_direction(self.direction):
            raise Exception("Invalid direction: %s" % self.direction)

        # Avoid double register sets to ease debuggability
        for k in self._match_kwargs:
            if k == DIRECTION_REG and self.direction:
                raise Exception("Register %s should not be directly set" % k)
            if k == IMSI_REG and self.imsi:
                raise Exception("Register %s should not be directly set" % k)