]> git.decadent.org.uk Git - dak.git/commitdiff
Implicitly release lock when closing file
authorAnsgar Burchardt <ansgar@debian.org>
Wed, 17 Jun 2015 07:57:01 +0000 (09:57 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 17 Jun 2015 22:09:55 +0000 (00:09 +0200)
Letting Python close the file will also release the lock after having
flushed all buffers.

Reported-by: Niels Thykier <niels@thykier.net>
daklib/rm.py

index f9917584b607d2059e5b1a56c07ece520eb4dd3a..e20cb5c1abe5850ff40c1214d8cb55fd1a47162e 100644 (file)
@@ -585,6 +585,3 @@ def remove(session, reason, suites, removals,
 
         logfile.write("=========================================================================\n")
         logfile822.write("\n")
-
-        fcntl.lockf(logfile822, fcntl.LOCK_UN)
-        fcntl.lockf(logfile, fcntl.LOCK_UN)