diff options
| author | bwarsaw | 2006-07-08 18:07:28 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-07-08 18:07:28 +0000 |
| commit | e7480eee3371b0ed5f1b388af129459d1456cc7d (patch) | |
| tree | bcd4fa8a12c81bd45780b937b7b8a0bdfdb65912 /Mailman/MailList.py | |
| parent | c638bce69ed31001eff7c580d0a37bb807211e2b (diff) | |
| download | mailman-e7480eee3371b0ed5f1b388af129459d1456cc7d.tar.gz mailman-e7480eee3371b0ed5f1b388af129459d1456cc7d.tar.zst mailman-e7480eee3371b0ed5f1b388af129459d1456cc7d.zip | |
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index de43887ef..953ac02d7 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -325,9 +325,14 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, self.advertised = config.DEFAULT_LIST_ADVERTISED self.max_num_recipients = config.DEFAULT_MAX_NUM_RECIPIENTS self.max_message_size = config.DEFAULT_MAX_MESSAGE_SIZE - # See the note in Defaults.py concerning DEFAULT_HOST_NAME - # vs. DEFAULT_EMAIL_HOST. - self.host_name = config.DEFAULT_HOST_NAME or config.DEFAULT_EMAIL_HOST + # XXX Don't set host_name if the attribute is already set. This is a + # hack to ensure that MailList.Create() doesn't create a bogus private + # archive directory via Archiver.InitVars(). The problem is that + # there's no way to set this value to what Create() knows it should be + # for Archiver.Initvars(), before MailList.InitVar() blows it away. + if not hasattr(self, 'host_name'): + self.host_name = config.DEFAULT_HOST_NAME or \ + config.DEFAULT_EMAIL_HOST self.web_page_url = ( config.DEFAULT_URL or config.DEFAULT_URL_PATTERN % config.DEFAULT_URL_HOST) @@ -502,14 +507,17 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, Utils.makedirs(self._full_path) # Don't use Lock() since that tries to load the non-existant config.pck self.__lock.lock() + # We need to set this attribute before calling InitVars() because + # Archiver.InitVars() depends on this to calculate and create the + # archive directory. Without this, Archiver will create a bogus + # archive directory using the default host name. + self.host_name = email_host self.InitVars(listname, admin_email, crypted_password) self.CheckValues() if langs is None: self.available_languages = [self.preferred_language] else: self.available_languages = langs - # Set the various host names - self.host_name = email_host url_host = config.domains[email_host] self.web_page_url = config.DEFAULT_URL_PATTERN % url_host |
