[Bug 610364] [NEW] fix_url won't save list as no Lock

David Shrimpton 610364 at bugs.launchpad.net
Tue Jul 27 10:22:50 CEST 2010


Public bug reported:

In mailman 2.1.13 and 2.1.11 using python 2.52 on a linux host

bin/withlist -r fix_url listname -u url

fails with

Mailman.LockFile.NotLockedError

eg

bin/withlist -r fix_url listname -u url

Importing fix_url...
Running fix_url.fix_url()...
Loading list test (unlocked)
Setting web_page_url to: URL
Setting host_name to: HOSTNAME
Saving list
Traceback (most recent call last):
  File "bin/withlist", line 299, in <module>
    main()
  File "bin/withlist", line 277, in main
    r = do_list(listname, args, func)
  File "bin/withlist", line 202, in do_list
    return func(m, *args)
  File "/opt/mailman/bin/fix_url.py", line 86, in fix_url
    mlist.Save()
  File "/opt/mailman/Mailman/MailList.py", line 559, in Save
    self.__lock.refresh()
  File "/opt/mailman/Mailman/LockFile.py", line 229, in refresh
    raise NotLockedError, '%s: %s' % (repr(self), self.__read())
Mailman.LockFile.NotLockedError: <LockFile 182965119600: /var/opt/mailman/its/locks/test.lock [unlocked: 18000sec] pid=9489>: None
Finalizing
 


Fix is 

*** bin/fix_url.py.orig	2010-05-30 16:12:06.000000000 +1000
--- bin/fix_url.py	2010-07-27 18:19:04.000000000 +1000
***************
*** 83,88 ****
--- 83,89 ----
          print _('Setting host_name to: %(mailhost)s')
      mlist.host_name = mailhost
      print _('Saving list')
+     mlist.Lock()
      mlist.Save()
      mlist.Unlock()

** Affects: mailman
     Importance: Undecided
         Status: New

-- 
fix_url won't save list as no Lock
https://bugs.launchpad.net/bugs/610364
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.


More information about the Mailman-coders mailing list