From 386a03ff2e57f2b01821fcda9e3abf77308eea14 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Sun, 22 Feb 2004 22:43:15 +0000 Subject: update_pending(): Tokio Kikuchi's patch #899263 for ignoring duplicate pending ids. (With slight modification by BAW.) --- bin/update | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/update b/bin/update index 47affa25..e57a588d 100755 --- a/bin/update +++ b/bin/update @@ -582,8 +582,10 @@ def update_pending(): elif op == Pending.HELD_MESSAGE: # data[0] is the hold id. There better only be one entry per id id = data[0] - assert not holds_by_id.has_key(id) - holds_by_id[id] = (key, val) + if holds_by_id.has_key(id): + print _('WARNING: Ignoring duplicate pending ID: %(id)s.') + else: + holds_by_id[id] = (key, val) # Now we have to lock every list and re-pend all the appropriate # requests. Note that this will reset all the expiration dates, but that # should be fine. -- cgit v1.2.3