def ip_bracket(addr):
    if addr and ':' in addr and not addr.startswith('['):
        return '[{0}]'.format(addr)
    return addr
Convert IP address representation to ZMQ (URL) format. ZMQ expects
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/ip_bracket