summaryrefslogtreecommitdiff
path: root/scripts/post
diff options
context:
space:
mode:
authorklm1998-07-15 16:44:31 +0000
committerklm1998-07-15 16:44:31 +0000
commit74ca789936327b6197f64f73aca1905f134c90d3 (patch)
treeca7054c555c6902cda9c74751e510accae84b8fd /scripts/post
parentb5c7aab810f29be4d07e6b318f8a277153265a16 (diff)
downloadmailman-74ca789936327b6197f64f73aca1905f134c90d3.tar.gz
mailman-74ca789936327b6197f64f73aca1905f134c90d3.tar.zst
mailman-74ca789936327b6197f64f73aca1905f134c90d3.zip
Check for existing lock before unlocking.
QUESTION: The MailList.Unlock() method currently raises two different AttributeErrors when the list is not currently locked (depending on whether or not the lock was previously created). This certainly seems like the wrong exception. We could make .Unlock() check for the lock and return a better exception, or we could have it just return if the list is not locked. I'm inclined towards the latter, but it changes the character of the list locking interface a wee bit. I think it ought to be changed, one way or the other. John, what's your inclination? Ken
Diffstat (limited to 'scripts/post')
-rwxr-xr-xscripts/post4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/post b/scripts/post
index 11f208b14..00f437e87 100755
--- a/scripts/post
+++ b/scripts/post
@@ -104,5 +104,5 @@ notification of the moderator's decison.
raw = 1)
# Let another process run.
finally:
- current_list.Unlock()
-
+ if current_list.Locked():
+ current_list.Unlock()