summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/pipermail.py
diff options
context:
space:
mode:
authorcotton1998-11-05 13:20:32 +0000
committercotton1998-11-05 13:20:32 +0000
commitebdd17d0ea68de383608290355f7d835e5eb8f34 (patch)
tree002d4aa6e55aec80bc25c41e8475b365ba38a374 /Mailman/Archiver/pipermail.py
parentd15bbedb2c836624c7790289de075140865e7db8 (diff)
downloadmailman-ebdd17d0ea68de383608290355f7d835e5eb8f34.tar.gz
mailman-ebdd17d0ea68de383608290355f7d835e5eb8f34.tar.zst
mailman-ebdd17d0ea68de383608290355f7d835e5eb8f34.zip
added a snippet to T.__init__ to make it possible to move archives
from one place to another. simply take the basedir argument as precedent over the saved state version of basedir. I initially considered doing this for the purpose of upgrading list html archives from cvs sources between b5 and b6. Seems as though anyone who set up pipermail archiving previously will benefit from the change, and that it's a good thing for the pipermail module to. scott
Diffstat (limited to 'Mailman/Archiver/pipermail.py')
-rw-r--r--Mailman/Archiver/pipermail.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py
index 84a1b162a..d5c5262af 100644
--- a/Mailman/Archiver/pipermail.py
+++ b/Mailman/Archiver/pipermail.py
@@ -178,6 +178,14 @@ class T:
self._dirty_archives=[] # Archives that will have to be updated
self.sequence=0 # Sequence variable used for numbering articles
self.update_TOC=0 # Does the TOC need updating?
+ #
+ # make the basedir variable work when passed in as an __init__ arg
+ # and different from the one in the pickle. Let the one passed in
+ # as an __init__ arg take precedence if it's stated. This way, an
+ # archive can be moved from one place to another and still work.
+ #
+ if basedir != self.basedir:
+ self.basedir = basedir
def close(self):
"Close an archive, saving its state and updating any changed archives."