diff options
| author | bwarsaw | 2002-11-07 22:30:51 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-11-07 22:30:51 +0000 |
| commit | bc5532a1467549e958b26fa29f25e18bfe5d0ecf (patch) | |
| tree | 0ae63fe9ab31e90a620b3f7ea2b7f9ad88c86b7e | |
| parent | 9cf7d3cbcc71975cf6332963a492d1edb1ab4c68 (diff) | |
| download | mailman-bc5532a1467549e958b26fa29f25e18bfe5d0ecf.tar.gz mailman-bc5532a1467549e958b26fa29f25e18bfe5d0ecf.tar.zst mailman-bc5532a1467549e958b26fa29f25e18bfe5d0ecf.zip | |
| -rw-r--r-- | Mailman/Archiver/HyperArch.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index e6d2a0795..554fca558 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -293,11 +293,19 @@ class Article(pipermail.Article): d = self.__dict__.copy() # We definitely don't want to pickle the MailList instance, so just # pickle a reference to it. - del d['_mlist'] - d['__listname'] = self._mlist.internal_name() + if d.has_key('_mlist'): + mlist = d['_mlist'] + del d['_mlist'] + else: + mlist = None + if mlist: + d['__listname'] = self._mlist.internal_name() + else: + d['__listname'] = None # Delete a few other things we don't want in the pickle for attr in ('prev', 'next', 'body'): - del d[attr] + if d.has_key(attr): + del d[attr] d['body'] = [] return d @@ -311,10 +319,10 @@ class Article(pipermail.Article): del d['__listname'] d['_mlist'] = self._open_list(listname) if not d.has_key('_lang'): - if self._mlist is None: - self._lang = mm_cfg.DEFAULT_SERVER_LANGUAGE - else: + if hasattr(self, '_mlist'): self._lang = self._mlist.preferred_language + else: + self._lang = mm_cfg.DEFAULT_SERVER_LANGUAGE if not d.has_key('charset'): self.charset = Utils.GetCharSet(self._lang) if not d.has_key('cenc'): |
