コード例 #1
0
ファイル: states.py プロジェクト: davesteele/comitup
def connected_start():
    global conn_list

    ip = nm.get_active_ip()
    mdns.add_hosts(dns_names, ip)

    conn_list = []
コード例 #2
0
ファイル: states.py プロジェクト: devmckeon/comitup
def hotspot_pass():
    log.debug("Activating mdns")

    # IP tolerance for PI 2
    for _ in range(5):
        ip = nm.get_active_ip(modemgr.get_state_device('HOTSPOT'))
        if ip:
            mdns.clear_entries()
            mdns.add_hosts(dns_names)
            break
        time.sleep(1)
コード例 #3
0
ファイル: states.py プロジェクト: devmckeon/comitup
def connected_start():
    global conn_list

    # IP tolerance for PI 2
    for _ in range(5):
        ip = nm.get_active_ip(modemgr.get_state_device('CONNECTED'))
        if ip:
            mdns.clear_entries()
            mdns.add_hosts(dns_names)
            break
        time.sleep(1)

    conn_list = []
コード例 #4
0
ファイル: states.py プロジェクト: davesteele/comitup
def hotspot_pass():
    log.debug("Activating mdns")

    ip = nm.get_active_ip()
    mdns.add_hosts(dns_names, ip)