diff options
author | Mark Sapiro <mark@msapiro.net> | 2010-07-27 07:41:37 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2010-07-27 07:41:37 -0700 |
commit | 4bd962a8cab42a0262cceed71bcbd8b42294a293 (patch) | |
tree | 509417fd0a0ddcabeb82f9167d52f1444863b804 /bin/fix_url.py | |
parent | aeb387cbedd8c2a7791a42e0e387e2327b87e68b (diff) | |
download | mailman2-4bd962a8cab42a0262cceed71bcbd8b42294a293.tar.gz mailman2-4bd962a8cab42a0262cceed71bcbd8b42294a293.tar.xz mailman2-4bd962a8cab42a0262cceed71bcbd8b42294a293.zip |
Changed fix_url to lock the list if not locked. Bug #610364.
Diffstat (limited to '')
-rw-r--r-- | bin/fix_url.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/fix_url.py b/bin/fix_url.py index 2d8dda58..d2731c14 100644 --- a/bin/fix_url.py +++ b/bin/fix_url.py @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2010 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -69,6 +69,11 @@ def fix_url(mlist, *args): elif opt in ('-v', '--verbose'): verbose = 1 + # Make sure list is locked. + if not mlist.Locked(): + if verbose: + print _('Locking list') + mlist.Lock() if urlhost: web_page_url = mm_cfg.DEFAULT_URL_PATTERN % urlhost mailhost = mm_cfg.VIRTUAL_HOSTS.get(urlhost.lower(), urlhost) |