diff options
| author | bwarsaw | 2001-05-09 06:19:14 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-09 06:19:14 +0000 |
| commit | 03cefec889a189ac182db77a254bee97fc3d4ac7 (patch) | |
| tree | 7c96cbd0ed28cba10b2fcbcf6ff86c0707e59d36 /Mailman/MailList.py | |
| parent | f962b15920931829141daabce998f02005e9136d (diff) | |
| download | mailman-03cefec889a189ac182db77a254bee97fc3d4ac7.tar.gz mailman-03cefec889a189ac182db77a254bee97fc3d4ac7.tar.zst mailman-03cefec889a189ac182db77a254bee97fc3d4ac7.zip | |
Create(): Wrap the os.makedirs() in a try/except transforming OSErrors
into MMUnknownListError.
ProcessConfirmation(): Fix unpacking of the data coming back from
Pending.confirm(). op is always the first element, but data is the
1st through nth elements.
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 36cad1fd4..2169104f0 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -828,7 +828,10 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, Utils.ValidateEmail(admin) omask = os.umask(0) try: - os.makedirs(os.path.join(mm_cfg.LIST_DATA_DIR, name), 02775) + try: + os.makedirs(os.path.join(mm_cfg.LIST_DATA_DIR, name), 02775) + except OSError: + raise Errors.MMUnknownListError finally: os.umask(omask) self._full_path = os.path.join(mm_cfg.LIST_DATA_DIR, name) @@ -1067,7 +1070,8 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, if data is None: raise Errors.MMBadConfirmation, 'data is None' try: - op, data = data + op = data[0] + data = data[1:] except ValueError: raise Errors.MMBadConfirmation, 'op-less data %s' % data if op == Pending.SUBSCRIPTION: @@ -1300,6 +1304,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, def HasExplicitDest(self, msg): """True if list name or any acceptable_alias is included among the to or cc addrs.""" + # BAW: fall back to Utils.ParseAddr if the first test fails. # this is the list's full address listfullname = '%s@%s' % (self.internal_name(), self.host_name) recips = [] |
