Esempio n. 1
0
def apply_wifi_config(tp, sec):
    try:
        message = prov.config_apply_config_request(sec)
        response = tp.send_data('prov-config', message)
        return (prov.config_apply_config_response(sec, response) == 0)
    except RuntimeError as e:
        on_except(e)
        return None
def apply_wifi_config(tp, sec):
    """
    Apply Wi-Fi config based on input parameters
    `tp` -  Object of class: Transport 
    `sec`- Object of class: Security
    """
    try:
        message = prov.config_apply_config_request(sec)
        response = tp.send_data('prov-config', message)
        return (prov.config_apply_config_response(sec, response) == 0)
    except RuntimeError as e:
        on_except(e)
        return None