]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/rm.py
Implicitly release lock when closing file
[dak.git] / daklib / rm.py
index 00643b1e5f1b09a850ba53f76c761718810e11e6..e20cb5c1abe5850ff40c1214d8cb55fd1a47162e 100644 (file)
@@ -372,7 +372,7 @@ def remove(session, reason, suites, removals,
     if date is None:
         date = commands.getoutput("date -R")
 
-    if partial:
+    if partial and components:
 
         component_ids_list = []
         for componentname in components:
@@ -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)