From 8c4424860258dcf5fd107feb4388c50dbd08155c Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Fri, 4 Dec 2020 13:34:58 -0800 Subject: [PATCH] CICD: openwrt ctl expect login improvements. This helped with logging into recent TIP openwrt images. Signed-off-by: Ben Greear --- openwrt_ctl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openwrt_ctl.py b/openwrt_ctl.py index 182742b6..89aa8ef3 100755 --- a/openwrt_ctl.py +++ b/openwrt_ctl.py @@ -134,6 +134,9 @@ def main(): egg.sendline(NL) try: i = egg.expect([prompt, "Please press Enter to activate", "login:"], timeout=3) + if (i == 1): + egg.setdline(NL) + i = egg.expect([prompt, "Please press Enter to activate", "login:"], timeout=3) if (i == 2): egg.sendline(user) egg.expect("Password:")