bitbake/unlockfile: Fix exception handling
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
6a0abfa82d
commit
5f866ac84f
|
@ -450,7 +450,7 @@ def unlockfile(lf):
|
|||
# removing the lockfile. Attempt this, ignore failures.
|
||||
fcntl.flock(lf.fileno(), fcntl.LOCK_EX|fcntl.LOCK_NB)
|
||||
os.unlink(lf.name)
|
||||
except IOError, OSError:
|
||||
except (IOError, OSError):
|
||||
pass
|
||||
fcntl.flock(lf.fileno(), fcntl.LOCK_UN)
|
||||
lf.close()
|
||||
|
|
Loading…
Reference in New Issue