From 4c117b92deff14f9df14898349d9f38f948450fa Mon Sep 17 00:00:00 2001 From: gabekassel Date: Wed, 30 Jun 2021 21:25:17 -0700 Subject: [PATCH] [otci] fix OTCI.wait arg order (#6777) In wait, match_line is called with the arguments flipped. The first argument is supposed to the be the line being checked, and the second is supposed to be the pattern to match. The reason this still works for strings is because output is treated as a list of lines to expect, and each is just compared with == to the actual expected line --- tools/otci/otci/otci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/otci/otci/otci.py b/tools/otci/otci/otci.py index 91f5bf0c5..eaba35dc8 100644 --- a/tools/otci/otci/otci.py +++ b/tools/otci/otci/otci.py @@ -75,7 +75,7 @@ class OTCI(object): while duration > 0: output = self.__otcmd.wait(1) - if match_line(expect_line, output): + if any(match_line(line, expect_line) for line in output): success = True break