aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-12-11 19:07:32 +0100
committerTom Rini <trini@konsulko.com>2023-12-13 18:39:06 -0500
commit643f5c37fb6c7db7cd319115da3d176550094ac2 (patch)
treefaa96cc353e35d41e4f773bd15621979a24d28f3
parentace49c7df73fd27b40a96ab09cce31998735ce35 (diff)
downloadu-boot-643f5c37fb6c7db7cd319115da3d176550094ac2.zip
u-boot-643f5c37fb6c7db7cd319115da3d176550094ac2.tar.gz
u-boot-643f5c37fb6c7db7cd319115da3d176550094ac2.tar.bz2
test: fit: 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>
-rwxr-xr-xtest/py/tests/test_fit.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py
index f458484..04f64fd 100755
--- a/test/py/tests/test_fit.py
+++ b/test/py/tests/test_fit.py
@@ -390,10 +390,10 @@ def test_fit(u_boot_console):
cons = u_boot_console
+ # 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
mkimage = cons.config.build_dir + '/tools/mkimage'
run_fit_test(mkimage)
finally: