[REF] runbot: Remove used variable before assigned

When the lock file creation fails, the file descriptor is not assigned.
Before this commit, an ValueError was raised in such a situation.
This commit is contained in:
Moisés López 2018-03-27 10:32:26 -06:00 committed by Christophe Monniez
parent 23ad9f4bc0
commit dcdd16038b

View File

@ -46,7 +46,6 @@ def locked(filename):
try:
fd = os.open(filename, os.O_CREAT | os.O_RDWR, 0o600)
except OSError:
os.close(fd)
return False
try:
fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)