From: Heinrich Schuchardt Date: Mon, 11 Dec 2023 18:07:32 +0000 (+0100) Subject: test: fit: Using variable 'old_dtb' before assignment X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=643f5c37fb6c7db7cd319115da3d176550094ac2;p=u-boot.git 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 Reviewed-by: Simon Glass --- diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py index f45848484e..04f64fd4bc 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: