def ip_addr(interface):
    """ Get IP address from interface.

    """
    try:
        return netifaces.ifaddresses(interface)[netifaces.AF_INET][0]['addr']
    except __HOLE__:
        raise ValueError(_("You have selected an invalid interface"))
dataset/ETHPy150Open nils-werner/zget/zget/utils.py/ip_addr