mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-03-03 14:20:40 +01:00

Since the list of files copied to /tmp was part of the return value from pre_test(), if an exception occurred inside pre_test(), "copied" would be undefined and the post_test(ctx, copied) call in the finally clause cause another exception: raceback (most recent call last): File "/home/balrog/repos/iwd/tools/test-runner", line 1508, in <module> run_tests() File "/home/balrog/repos/iwd/tools/test-runner", line 1242, in run_tests run_auto_tests(config.ctx, args) File "/home/balrog/repos/iwd/tools/test-runner", line 1166, in run_auto_tests post_test(ctx, copied) UnboundLocalError: local variable 'copied' referenced before assignment (apart from not being able to clean up the files). Pass "copied" as a paremeter to pre_test instead.