def __call__(self, string):
        parts = string.split(':', 1)
        name = parts[0]
        host = parts[-1]
        try:
            self.socket.getaddrinfo(host, 0)
        except self.socket.gaierror:
            msg = host % "hostname: %s is not resolvable"
            raise argparse.ArgumentError(None, msg)

        try:
            self.socket.getaddrinfo(name, 0, 0, 0, 0, self.socket.AI_NUMERICHOST)
        except self.socket.gaierror:
            return string  # not an IP
        else:
            msg = '%s must be a hostname not an IP' % name
            raise argparse.ArgumentError(None, msg)

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