summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: