bitbake/unlockfile: Fix exception handling

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-01-26 12:20:14 +00:00
parent 6a0abfa82d
commit 5f866ac84f
1 changed files with 1 additions and 1 deletions

View File

@ -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()