summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1998-12-18 16:13:27 +0000
committerbwarsaw1998-12-18 16:13:27 +0000
commit93b25c1eaf7df8f6a0ebce3221b3578a8421dace (patch)
tree8d0b416b0fb6ac6b10d302a2ad554c368e853c36
parent661aaea560e5645e610c50064e21b5d610010696 (diff)
downloadmailman-93b25c1eaf7df8f6a0ebce3221b3578a8421dace.tar.gz
mailman-93b25c1eaf7df8f6a0ebce3221b3578a8421dace.tar.zst
mailman-93b25c1eaf7df8f6a0ebce3221b3578a8421dace.zip
-rw-r--r--Mailman/LockFile.py5
-rw-r--r--Mailman/flock.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/Mailman/LockFile.py b/Mailman/LockFile.py
index 3fb7a5244..a23b1f087 100644
--- a/Mailman/LockFile.py
+++ b/Mailman/LockFile.py
@@ -132,6 +132,11 @@ class FileLock:
os.unlink(self.tmpfname)
self.__kickstart(force=1)
continue
+ # TBD: This assertion is here because if winner==self.tmpfname,
+ # then we should already have the lock. If we already have the
+ # lock, then we should have never gotten into this loop (in a
+ # single threaded process), because we check the lock status above
+ # first, and raise an AlreadyCalledLockError in that case.
assert winner <> self.tmpfname
# record the previous winner and the current time
if pid <> last_pid:
diff --git a/Mailman/flock.py b/Mailman/flock.py
index 3fb7a5244..a23b1f087 100644
--- a/Mailman/flock.py
+++ b/Mailman/flock.py
@@ -132,6 +132,11 @@ class FileLock:
os.unlink(self.tmpfname)
self.__kickstart(force=1)
continue
+ # TBD: This assertion is here because if winner==self.tmpfname,
+ # then we should already have the lock. If we already have the
+ # lock, then we should have never gotten into this loop (in a
+ # single threaded process), because we check the lock status above
+ # first, and raise an AlreadyCalledLockError in that case.
assert winner <> self.tmpfname
# record the previous winner and the current time
if pid <> last_pid: