From 4bd962a8cab42a0262cceed71bcbd8b42294a293 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 27 Jul 2010 07:41:37 -0700 Subject: Changed fix_url to lock the list if not locked. Bug #610364. --- bin/fix_url.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') 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) -- cgit v1.2.3