fetch: Fix uninitialised variable issue
PATCH 1/1 fetch: Fix uninitialised variable issue
Running fetcher functions directly from bitbake-setup with an invalid DL_DIR can result in an obtuse error:
ERROR: cannot access local variable 'lf' where it is not associated with a value
Make sure lf has some value, which means the real error isn't hidden.
[YOCTO #16494]
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/fetch/__init__.py | 1 + 1 file changed, 1 insertion(+)
lib/bb/fetch/__init__.py +1 -0
@@ -1904,6 +1904,7 @@ class Fetch(object): m = ud.method done = False + lf = None try: lf = bb.utils.lockfile(ud.lockfile, shared=True)