[Mailman-Developers] Re: CVS: mailman/Mailman MailList.py Archiver.py

Harald Meland Harald.Meland@usit.uio.no
21 Oct 1998 20:44:30 +0200


[scott@chronis.pobox.com]

> Update of /export/public/cvsroot/mailman/Mailman
> In directory anthem:/tmp/cvs-serv5888/Mailman
> 
> Modified Files:
> 	MailList.py Archiver.py 
> Log Message:
> code cleanup:
> moved the archivery directory checking code to
> Archiver.Archiver.CheckHTMLArchiveDir() and call that from
> MailList.Save(). 

As I'm not very familiar with python yet (and thus probably shouldn't
be running bleeding edge CVS versions of Mailman :), I'm not positive
that this is what's biting me.  Still, here goes:

When submitting changed archiving options from

  web_page_url/admin/<listname>/archive

I get traces like this one:

  Traceback (innermost last):
    File "/local/Mailman/scripts/driver", line 103, in run_main
      main()
    File "../Mailman/Cgi/admin.py", line 159, in main
      ChangeOptions(lst, category, cgi_data, doc)
    File "../Mailman/Cgi/admin.py", line 799, in ChangeOptions
      lst.Save()
    File "/local/Mailman/Mailman/MailList.py", line 645, in Save
      self.CheckHTMLArchiveDir()
    File "/local/Mailman/Mailman/Archiver.py", line 249, in CheckHTMLArchiveDir
      self.LogMsg("CheckHTMLArchiveDir: error getting archive mode for %s!: %s\n",
    File "/local/Mailman/Mailman/MailList.py", line 675, in LogMsg
      logf.write("%s\n" % (msg % args))
  TypeError: not all arguments converted

on the first submit.  Additional submits work OK.  The options
actually get changed on the first submit, but the tracebacks are kinda
annoying :)

I have glanced at the code in question, but the only thing that looked
suspicious to my untrained python eyes was at the end of
Mailman/Archiver.py:

   236          if self.archive_private:
   237              if mode != 0770:
   238                  try:
   239                      ou = os.umask(0)
   240                      os.chmod(self.archive_directory, 02770)

Doesn't this imply that the chmod is done even if the mode already is
02770?  If so, the same goes for public archives, too.

BTW, is there any easy way of renaming a Mailman list (i.e. not in the
MTA aliases)?
-- 
Harald