diff options
| -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 |
