mirror of
https://git.yoctoproject.org/poky
synced 2026-09-24 13:36:22 +02:00
fetch2: add try/finally to ensure lockfile is unlocked on failure
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
@@ -830,6 +830,7 @@ class Fetch(object):
|
||||
|
||||
lf = bb.utils.lockfile(ud.lockfile)
|
||||
|
||||
try:
|
||||
if not m.need_update(u, ud, self.d):
|
||||
localpath = ud.localpath
|
||||
elif m.try_premirror(u, ud, self.d):
|
||||
@@ -873,6 +874,7 @@ class Fetch(object):
|
||||
verify_checksum(u, ud, self.d)
|
||||
open(ud.donestamp, 'w').close()
|
||||
|
||||
finally:
|
||||
bb.utils.unlockfile(lf)
|
||||
|
||||
def checkstatus(self, urls = []):
|
||||
|
||||
Reference in New Issue
Block a user