summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/pipermail.py
diff options
context:
space:
mode:
authorbwarsaw1999-08-21 05:28:32 +0000
committerbwarsaw1999-08-21 05:28:32 +0000
commit0188a27d96c5a5a3b371e395b63743b0d5396ebc (patch)
tree68ef712da7b3f7b4aa66403cba3bc5e097a5318d /Mailman/Archiver/pipermail.py
parent54913081da961ddafeb2f0591850af03497dc65d (diff)
downloadmailman-0188a27d96c5a5a3b371e395b63743b0d5396ebc.tar.gz
mailman-0188a27d96c5a5a3b371e395b63743b0d5396ebc.tar.zst
mailman-0188a27d96c5a5a3b371e395b63743b0d5396ebc.zip
Make sure we use cPickle if it exists. This change may or may not
have any effect.
Diffstat (limited to 'Mailman/Archiver/pipermail.py')
-rw-r--r--Mailman/Archiver/pipermail.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py
index d5c5262af..aa72c7250 100644
--- a/Mailman/Archiver/pipermail.py
+++ b/Mailman/Archiver/pipermail.py
@@ -1,6 +1,13 @@
#! /usr/bin/env python
-import os, sys, pickle, string, re
+import os, sys, string, re
+
+try:
+ import cPickle
+ pickle = cPickle
+except ImportError:
+ import pickle
+
from Mailman.Utils import mkdir, open_ex
# TBD: ugly, ugly, ugly -baw
open = open_ex
@@ -253,7 +260,6 @@ class T:
# Update the threaded index completely
def updateThreadedIndex(self):
- import pickle, sys
# Erase the threaded index
self.database.clearIndex(self.archive, 'thread')
@@ -520,7 +526,6 @@ class BSDDBdatabase(Database):
# Add a single article to the internal indexes for an archive.
def addArticle(self, archive, article, subjectkey, authorkey):
- import pickle
self.__openIndices(archive)
# Add the new article