def __invariant__(self):
        """
        Check that ``maximum_retry_count`` is positive or None

        :raises ValueError: If maximum_retry_count is invalid.
        """
        if self.maximum_retry_count is not None:
            if not isinstance(self.maximum_retry_count, int):
                return (False,
                        "maximum_retry_count must be an integer or None, "
                        "got %r" % (self.maximum_retry_count,))
            if self.maximum_retry_count < 1:
                return (False,
                        "maximum_retry_count must be positive, "
                        "got %r" % (self.maximum_retry_count,))
        return (True, "")
dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/_model.py/RestartOnFailure.__invariant__/original