Skip to content

Commit 7f77552

Browse files
committed
update
1 parent 5419686 commit 7f77552

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Mailman/ListAdmin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ def SaveRequestsDb(self):
205205

206206
def NumRequestsPending(self):
207207
self.__opendb()
208-
# Subtract one for the version pseudo-entry
209-
return len(self.__db) - 1
208+
if not self.__db:
209+
return 0
210+
# For Python 2 pickles, the version pseudo-entry might not exist
211+
# Just return the length of the dictionary
212+
return len(self.__db)
210213

211214
def __getmsgids(self, rtype):
212215
self.__opendb()

0 commit comments

Comments
 (0)