Hello,
Since I upgraded to 1.0b7 I get a couple of these messages each day. Any ideas why ?
Traceback (innermost last): File "/usr/lib/mailman/cron/run_queue", line 27, in ? OutgoingQueue.processQueue() File "/usr/lib/mailman/Mailman/OutgoingQueue.py", line 126, in processQueue Utils.TrySMTPDelivery(recip,sender,text,full_fname) File "/usr/lib/mailman/Mailman/Utils.py", line 217, in TrySMTPDelivery OutgoingQueue.dequeueMessage(queue_entry) File "/usr/lib/mailman/Mailman/OutgoingQueue.py", line 184, in dequeueMessage os.unlink(q_entry) os.error: (2, 'No such file or directory')
Greg
On Sun, 10 Jan 1999, Gergely Madarasz wrote:
Hello,
Since I upgraded to 1.0b7 I get a couple of these messages each day. Any ideas why ?
Traceback (innermost last): File "/usr/lib/mailman/cron/run_queue", line 27, in ? OutgoingQueue.processQueue() File "/usr/lib/mailman/Mailman/OutgoingQueue.py", line 126, in processQueue Utils.TrySMTPDelivery(recip,sender,text,full_fname) File "/usr/lib/mailman/Mailman/Utils.py", line 217, in TrySMTPDelivery OutgoingQueue.dequeueMessage(queue_entry) File "/usr/lib/mailman/Mailman/OutgoingQueue.py", line 184, in dequeueMessage os.unlink(q_entry) os.error: (2, 'No such file or directory')
Fast fix: --- OutgoingQueue.py.orig Mon Jan 11 09:40:30 1999 +++ OutgoingQueue.py Mon Jan 11 09:40:50 1999 @@ -176,4 +176,7 @@ # remove it from the queue # def dequeueMessage(q_entry): - os.unlink(q_entry) + try: + os.unlink(q_entry) + except: + pass -- Linux Supporting Center -- Red Hat Qmail packages -- http://lsc.kva.hu PGP 0x1DE3631D / A8 B4 92 EE 1F 55 27 C8 86 64 9C 42 41 A4 BD B8 Don't spell GLIB backwards!
On Mon, 11 Jan 1999, Balazs Nagy wrote:
On Sun, 10 Jan 1999, Gergely Madarasz wrote:
[...] os.error: (2, 'No such file or directory')
Fast fix:
--- OutgoingQueue.py.orig Mon Jan 11 09:40:30 1999 +++ OutgoingQueue.py Mon Jan 11 09:40:50 1999 @@ -176,4 +176,7 @@ # remove it from the queue # def dequeueMessage(q_entry): - os.unlink(q_entry) + try: + os.unlink(q_entry) + except: + pass
(Thanks for the suggestion! Due to some overriding other concerns i won't have time immediately to look at incorporating it - maybe one of the other central folks will - but i do have a fairly important coding practice to suggest for mailman submissions. Avoid using unqualified 'excepts' unless the exception case code does something specific with the results. Ie, prevent hiding unanticipated exceptions, just catch the ones you mean to catch. In this case, something like 'except os.error' instead of 'except'. And that's just for the fast fix - a real fix should take check that the os.error is "no such file...", and perhaps log something... We're urgently trying to eliminate anything that hides bugs, otherwise the system's operation becomes full of mysteries, and not approachable as an open source effort. (Hidden bugs are nuisances in *any* context.) Please don't take this as a criticism of your input - i'm just taking the opportunity to make this practice clear to everyone.) ken manheimer klm@python.org
participants (3)
-
Balazs Nagy
-
Gergely Madarasz
-
Ken Manheimer