aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-12-11 19:07:33 +0100
committerTom Rini <trini@konsulko.com>2023-12-13 18:39:06 -0500
commit229c4da6ca183b91f2ad928ecec47e073bce1b1a (patch)
tree504c8045e6505a08fa4a2ae6355a220d2d9dd98b
parent643f5c37fb6c7db7cd319115da3d176550094ac2 (diff)
downloadu-boot-229c4da6ca183b91f2ad928ecec47e073bce1b1a.zip
u-boot-229c4da6ca183b91f2ad928ecec47e073bce1b1a.tar.gz
u-boot-229c4da6ca183b91f2ad928ecec47e073bce1b1a.tar.bz2
test: vboot: Using variable 'old_dtb' before assignment
old_dtb can only be assumed initialized in the finally block if it is assigned a value before the try statement. Avoid a pylint error reported by current pylint. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--test/py/tests/test_vboot.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index 04fa59f..7e0e8e4 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -533,10 +533,10 @@ def test_vboot(u_boot_console, name, sha_algo, padding, sign_options, required,
with open(evil_kernel, 'wb') as fd:
fd.write(500 * b'\x01')
+ # We need to use our own device tree file. Remember to restore it
+ # afterwards.
+ old_dtb = cons.config.dtb
try:
- # We need to use our own device tree file. Remember to restore it
- # afterwards.
- old_dtb = cons.config.dtb
cons.config.dtb = dtb
if global_sign:
test_global_sign(sha_algo, padding, sign_options)