diff options
| author | bwarsaw | 2003-04-19 15:41:34 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-04-19 15:41:34 +0000 |
| commit | 0a64042ccc3e26179a2a32c8340fbbe0a3b5b1d7 (patch) | |
| tree | c3b88c608f78314de78712f93ea5077ea905ba7b /Mailman/Queue | |
| parent | 2f4c1e22e5c17280ceef7820055ef5f644e784ad (diff) | |
| download | mailman-0a64042ccc3e26179a2a32c8340fbbe0a3b5b1d7.tar.gz mailman-0a64042ccc3e26179a2a32c8340fbbe0a3b5b1d7.tar.zst mailman-0a64042ccc3e26179a2a32c8340fbbe0a3b5b1d7.zip | |
_Switchboard.__init__(): Fixed slice end-point off-by-one calculation error.
Diffstat (limited to 'Mailman/Queue')
| -rw-r--r-- | Mailman/Queue/Switchboard.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py index 9a2540393..77179fcfe 100644 --- a/Mailman/Queue/Switchboard.py +++ b/Mailman/Queue/Switchboard.py @@ -72,8 +72,8 @@ class _Switchboard: self.__upper = None # BAW: test performance and end-cases of this algorithm if numslices <> 1: - self.__lower = (shamax * slice) / numslices - self.__upper = (shamax * (slice+1)) / numslices + self.__lower = ((shamax+1) * slice) / numslices + self.__upper = (((shamax+1) * (slice+1)) / numslices) - 1 def whichq(self): return self.__whichq @@ -139,7 +139,7 @@ class _Switchboard: # plain text. Second, the actual message file. However, we want to # first unlink the message file and then the .db file, because the # qrunner only cues off of the .db file - msg = data = None + msg = None try: data = self._ext_read(dbfile) os.unlink(dbfile) |
