def __call__(self, string):
        ip = string.split('/')[0]
        ip_parts = ip.split('.')

        if len(ip_parts) != 4:
            err = string % "subnet must have at least 4 numbers separated by dots like x.x.x.x/xx, but got: %s"
            raise argparse.ArgumentError(None, err)

        if [i for i in ip_parts[:4] if i.isalpha()]:  # only numbers
            err = "subnet must have digits separated by dots like x.x.x.x/xx, but got: %s" % string
            raise argparse.ArgumentError(None, err)

        if len(string.split('/')) != 2:
            err = "subnet must contain a slash, like x.x.x.x/xx, but got: %s" % string
            raise argparse.ArgumentError(None, err)

        return string
dataset/ETHPy150Open ceph/ceph-deploy/ceph_deploy/util/arg_validators.py/Subnet.__call__/swapped operands of `%`