[PATCH 1/2] fixup! test: pytest: have --qemu gobble up all remaining arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



test: pytest: fix command line parse error when --qemu is missing

Default is None, which is not suitable for iteration in a for loop. Give
it a default of [] instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 test/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/conftest.py b/test/conftest.py
index 64082869b329..03bf41a93874 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -41,7 +41,7 @@ def pytest_addoption(parser):
     parser.addoption('--blk', action='append', dest='qemu_block',
         default=[], metavar="FILE",
         help=('Pass block device to emulated barebox. Can be specified more than once'))
-    parser.addoption('--qemu', dest='qemu_arg', nargs=argparse.REMAINDER,
+    parser.addoption('--qemu', dest='qemu_arg', nargs=argparse.REMAINDER, default=[],
         help=('Pass all remaining options to QEMU as is'))
 
 @pytest.fixture(scope="session")
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux