def win_failed_login_ctl_fn(conf, process): auth_cmd = configure_auth_header_cmd(conf, altPwd="test") for cmd in auth_cmd: os.write(process.stdin, cmd[0]) (output, match_code, match_res) = expect_line(None, process) if cmd[1] is not None and match_code is None: # No match return -1
def win_rm_dpl_ctl_fn(conf, process): auth_cmd = configure_auth_header_cmd(conf) match_res_arr = list() cur_pos = -1 for cmd in auth_cmd: cur_pos += 1 cmd = cmd[0] if cmd[3] is not None: cmd = cmd%match_res_arr[cur_pos - cmd[3]] os.write(process.stdin, cmd) (output, match_code, match_res) = expect_line(None, process) if cmd[1] is not None and match_code is None: # No match return -1