diff options
author | Tom Rini <trini@konsulko.com> | 2025-02-12 16:23:54 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-21 08:24:05 -0600 |
commit | ea9131d904726e0775fab803e43809b8150f02b9 (patch) | |
tree | 142b4df730966632f01dbc7aadc61873afe180cf /test/py/tests/test_usb.py | |
parent | 203d3a9fc709571cfeacb93f1b027f6ecfcce173 (diff) |
test/py: Have test_usb.py raise an Exception with unsupported filesystems
With a newer pylint we get a warning about how offset could be used
before assigned. This is because when the underlying filesystem wasn't
one that is supported we would have runtime test failures. Address this
by raise'ing an Exception if fs is not supported.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test/py/tests/test_usb.py')
-rw-r--r-- | test/py/tests/test_usb.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py index 566d73b7c64..9bef883325f 100644 --- a/test/py/tests/test_usb.py +++ b/test/py/tests/test_usb.py @@ -580,6 +580,8 @@ def test_usb_load(u_boot_console): elif fs in ['ext4', 'ext2']: file, size, expected_crc32 = \ usb_ext4load_ext4write(u_boot_console, fs, x, part) + else: + raise Exception('Unsupported filesystem type %s' % fs) offset = random.randrange(128, 1024, 128) output = u_boot_console.run_command( |