~ubuntu-branches/ubuntu/quantal/mailman/quantal

« back to all changes in this revision

Viewing changes to debian/patches/02_HyperDatabase_mapkeys.patch

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Elie Mamane
  • Date: 2007-02-28 21:59:36 UTC
  • mfrom: (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20070228215936-ebt0lqmrlypezbiz
Tags: 1:2.1.9-7
Upgrade subject and author indexes of _all_ archiving volumes to
Unicode strings. (completely closes: #412142)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- Mailman/Archiver/HyperDatabase.py   2005-08-27 03:40:17.000000000 +0200
 
2
+++ Mailman/Archiver/HyperDatabase.py   2007-02-27 20:33:41.103527160 +0100
 
3
@@ -324,15 +343,22 @@
 
4
 
 
5
     def clearIndex(self, archive, index):
 
6
         self.__openIndices(archive)
 
7
         if hasattr(self.threadIndex, 'clear'):
 
8
             self.threadIndex.clear()
 
9
             return
 
10
         finished=0
 
11
         try:
 
12
             key, msgid=self.threadIndex.first()
 
13
         except KeyError: finished=1
 
14
         while not finished:
 
15
             del self.threadIndex[key]
 
16
             try:
 
17
                 key, msgid=self.threadIndex.next()
 
18
             except KeyError: finished=1
 
19
+
 
20
+    def mapKeys(self, f, archive, index):
 
21
+        self.__openIndices(archive)
 
22
+        index = getattr(self, index + 'Index')
 
23
+        d = index.dict
 
24
+        index.dict = dict(zip(map(f, d.keys()), d.values()))
 
25
+        index.__dirty = 1