diff options
| author | bwarsaw | 2003-02-24 15:37:57 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-02-24 15:37:57 +0000 |
| commit | b3b7010c4e974843ac95467f46d5d63c45e1bb6c (patch) | |
| tree | 4aeb2bd0b743d2f3b6fbb399cb1135e23d239d57 | |
| parent | 1c66b0498d297a43205ee0ca773fff42e19d7b75 (diff) | |
| download | mailman-b3b7010c4e974843ac95467f46d5d63c45e1bb6c.tar.gz mailman-b3b7010c4e974843ac95467f46d5d63c45e1bb6c.tar.zst mailman-b3b7010c4e974843ac95467f46d5d63c45e1bb6c.zip | |
__init__(): Don't call out to extend.py if name is None. This will be
the case when creating the mailing list, in which case fullpath() will
be None so we won't be able to locate the list directory.
| -rw-r--r-- | Mailman/MailList.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index be27f9e28..f5924228d 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -97,7 +97,10 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, self._memberadaptor = OldStyleMemberships(self) # This extension mechanism allows list-specific overrides of any # method (well, except __init__(), InitTempVars(), and InitVars() - # I think). + # I think). Note that fullpath() will return None when we're creating + # the list, which will only happen when name is None. + if name is None: + return filename = os.path.join(self.fullpath(), 'extend.py') dict = {} try: @@ -108,12 +111,11 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, func = dict.get('extend') if func: func(self) - if name: - if lock: - # This will load the database. - self.Lock() - else: - self.Load() + if lock: + # This will load the database. + self.Lock() + else: + self.Load() def __getattr__(self, name): # Because we're using delegation, we want to be sure that attribute |
