diff options
| author | bwarsaw | 2001-05-31 16:03:41 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-31 16:03:41 +0000 |
| commit | e6841ce42f4df2ee2fecc659adffbede2005afb9 (patch) | |
| tree | 88406566c6be5f229474154246d8bdc9d6ddcabb /Mailman/Pending.py | |
| parent | 0add6fdfa9852390980a7fdd9ba54e1689ff9b00 (diff) | |
| download | mailman-e6841ce42f4df2ee2fecc659adffbede2005afb9.tar.gz mailman-e6841ce42f4df2ee2fecc659adffbede2005afb9.tar.zst mailman-e6841ce42f4df2ee2fecc659adffbede2005afb9.zip | |
Diffstat (limited to 'Mailman/Pending.py')
| -rw-r--r-- | Mailman/Pending.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Mailman/Pending.py b/Mailman/Pending.py index 44b7c94e7..f196fd505 100644 --- a/Mailman/Pending.py +++ b/Mailman/Pending.py @@ -38,13 +38,18 @@ LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, 'pending.lock') # Types of pending records SUBSCRIPTION = 'S' UNSUBSCRIPTION = 'U' +CHANGE_OF_ADDRESS = 'C' def new(*content): """Create a new entry in the pending database, returning cookie for it.""" - # It's a programming error if this assertion fails! - assert content[:1] in ((SUBSCRIPTION,), (UNSUBSCRIPTION,)) + # It's a programming error if this assertion fails! We do it this way so + # the assert test won't fail if the sequence is empty. + assert content[:1] in ((SUBSCRIPTION,), + (UNSUBSCRIPTION,), + (CHANGE_OF_ADDRESS,), + ) # Acquire the pending database lock, letting TimeOutError percolate up. lock = LockFile.LockFile(LOCKFILE) lock.lock(timeout=30) |
